Word Interop Not Extracting Data
<p>I'm using Word 2016 and I'm having trouble getting data from the object.</p>

<p>My snippet is as such:</p>

<pre><code>    void Application_DocumentOpen(Word.Document document)
    {
        var test = document.Paragraphs;
    }
</code></pre>

<p>Before the assignment looking at paragraphs gives:</p>

<p>Evaluation of method Microsoft.Office.Interop.Word.DocumentClass.get_Paragraphs() calls requires a COM call. Evaluation of methods on COM objects is not supported in this context.</p>

<p>After it simply gives: System._ComObject with the member NativeView  which has 0x0df4fd18 </p>

<p>I've tried searching both errors, but haven't found related results.</p>

<p><strong>UPDATE</strong>
So I compared this to the example they give, which is:</p>

<pre><code>    void Application_DocumentBeforeSave(Word.Document Doc, ref bool SaveAsUI, ref bool Cancel)
    {
        Doc.Paragraphs[1].Range.InsertParagraphBefore();
        Doc.Paragraphs[1].Range.Text = "This text was added by using code.";
    }
</code></pre>

<p>What's neat is that if I look at <code>Doc.Paragraphs[1].Range.Text</code> for their example, I get the text of the paragraph. If I try to do it with my version I get: Cannot apply indexing with [] to an expression of type 'Paragraphs'</p>

<p>So... Paragraphs isn't returning what I expect it to. Is it possible that I don't have access to the document since the method is firing before it loads?</p>