title: Get active word document object
body: <p>I am converting a VB6 project to C# and I need to get the <strong>Active word document</strong> object. In vb6 it is easy by using</p>
  
  <pre><code>dim objWordDoc as Word.Document
  set objWordDoc = Word.ActiveDocument
  </code></pre>
  
  <p>I need to get the Word's active word document using C#.
  I have added the below references to the project</p>
  
  <p><a href="https://i.stack.imgur.com/Yi0rO.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/Yi0rO.png" alt="enter image description here"></a></p>
  
  <p>And added the references to the class as</p>
  
  <pre><code>using Word = Microsoft.Office.Interop.Word;
  using Office = Microsoft.Office.Core;
  
  Private Word.Document _activeDocument;
  </code></pre>
  
  <p>Is there any function like in C# to get the active word document?</p>
  
  <pre><code>_activeDocument = Word.Application.ActiveDocument;
  </code></pre>