Hello I have the fiollowing scenario
I would like to open a word document from a vb.net application using a process
I am currently doing the following
Dim startInfo As New ProcessStartInfo()
startInfo.FileName = "WINWORD.EXE"
startInfo.Arguments = fileName
Which seems to work fine, but I would like to get access to the document object launched by the process , the reason being after the process is started I would like to set some attributes of the document itself example the protection mode
I do not want to only open the document in readonly mode but I would also like to disable the word toolbar (gray it out)
I know I could have launched the document as follows
dim app as Word.Application
app = New Word.Application()
document = app.Documents.Open(fileName)
document.ActiveWindow.WindowState = Word.WdWindowState.wdWindowStateNormal
but need a handle to the process, which is critical in my case
what would be ideal is if I can do app.getHandle() or findHandle(app)?
Any way I could resolve this or alternatives to achieve what I want