title: Open a Word document with all format marks visible using VB.net
body: <p>I am building a Word custom Ribbon as a VSTO project using VB within the Visual Studio environment.
  Part of what I want to do is, from the Ribbon, open Word documents:</p>
  <ul>
  <li>with all the formatting marks visible</li>
  <li>the Styles pane visible .</li>
  </ul>
  <p>I have done this previously with VBA as an &quot;On Open&quot; event. I've used the following:</p>
  <pre><code>'Open Word with Styles pane visible and docked to the right
       With Application
           .TaskPanes(wdTaskPaneFormatting).Visible = True
           .CommandBars(&quot;Styles&quot;).Position = msoBarRight
       End With
       ActiveWindow.DocumentMap = True
      
   'Open document with all formatting and hidden text visible
       ActiveWindow.View.ShowAll = True
  </code></pre>
  <p>I've been searching for hours and cannot find how to do this with VB.net.</p>
  <p>Is anybody able to help please.</p>