I have tried using the PIAs for office to start Word (word.application), but can't find a way to get the window handle from it to attach to the InkOverlay object. Lately I have been using the System.Diagnostics.Process to start "WinWord" and retrieve the MainWindowHandle from it, but I get the error that the process has exited already (see code below).
Expand|Select|Wrap|Line Numbers
- Dim P as New Process
- With P.StartInfo
- .FileName = "C:\Program Files\Microsoft Office\OFFICE11\WINWORD.EXE"
- .WindowStyle = ProcessWindowStyle.Maximized
- .UseShellExecute = False
- End With
- P.Start()
- WinHandle = P.MainWindowHandle
-Matt Ray