Hello all, I want vb.net code to set focus or send cursor to ms word. Could you kindly help me?
For example,
Imports Microsoft.Offic e.Core
Imports Microsoft.Offic e.Interop
Dim wapp As Word.Applicatio n
Dim wdoc As Word.Document
wapp = GetObject(, "Word.Applicati on")
wapp = Nothing
wdoc = wapp.ActiveDocu ment
wapp.Visible = True
wapp.activedocu ment.range.text 'if i write like this i will get all text from MS word, but i want to set focus on ms word i want to know vb.net coding to set focus on ms word. if we use text box we just write textbox.focus() .
Please help me.
thank very much.
For example,
Imports Microsoft.Offic e.Core
Imports Microsoft.Offic e.Interop
Dim wapp As Word.Applicatio n
Dim wdoc As Word.Document
wapp = GetObject(, "Word.Applicati on")
wapp = Nothing
wdoc = wapp.ActiveDocu ment
wapp.Visible = True
wapp.activedocu ment.range.text 'if i write like this i will get all text from MS word, but i want to set focus on ms word i want to know vb.net coding to set focus on ms word. if we use text box we just write textbox.focus() .
Please help me.
thank very much.
Comment