Click here to Skip to main content
15,891,607 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
I have open word document using winword.exe in vb.net and then read that word document. It has working properly using word 2007/2013 but problem on word 2016/365 in vb.net

What I have tried:

'To open word document
VB
Dim objpro() As Process = Process.GetProcessesByName("WINWORD")
            iPrevProcess = objpro.Length
            objProcess.StartInfo.WindowStyle = ProcessWindowStyle.Maximized
            objProcess.StartInfo.FileName = szDisplayFile


' read that document using
Dim WordGlobal_definst As New Microsoft.Office.Interop.Word.Global
WordGlobal_definst.AciveDocument() get following error

"This command is not available"

Please help me
Posted
Updated 25-Sep-20 4:19am
v2

 
Share this answer
 
v2
Comments
[no name] 23-Aug-19 7:16am    
Thank you...!
Maciej Los 23-Aug-19 7:35am    
You're very welcome.
Use the following command
Shell("path.exe")
 
Share this answer
 

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900