Late binding in C# to Word Control in XAML/Store app
<p>Previously I've been able to find a Word document inside another application using </p>

<pre><code>[DllImport("Oleacc.dll")]
private static extern long AccessibleObjectFromWindow(int windowHandle, int objectID, Guid refID, ref IntPtr accessibleObject);
</code></pre>

<p>and casting the resultant object returned into a </p>

<pre><code>Microsoft.Office.Interop.Word.Window
</code></pre>

<p>This works pretty well in that I can inspect different properties about Word within, say, Microsoft Outlook, as MS Outlook uses a Word Window to render its email content.</p>

<p>However, its a little trickier in XAML/Windows Store app, as it appears that the Word doc is embedded without a direct window handle. Below is the inspector.exe output of the Window. The selected 'Message' item is my Word instance. However the only items in the tree with NativeWindowHandles according to the accessibility inspector are the Mail window and the title window. </p>

<p>Does anyone know how to marshall that Word control in an external XAML/store app into a C# object?</p>

<p><a href="https://i.stack.imgur.com/9upNr.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/9upNr.png" alt="enter image description here"></a></p>