On load event
-------------------
Dim filNm As String
Friend WithEvents objWinWordControl As WinWordControl.WinWordControl
filNm = openFileDialog1.FileName
objWinWordControl.LoadDocument(filNm)
" WinWordControl.WinWordControl ", It is a control i found it on internet.
Below is the link where i found this control
http://www.codeproject.com/dotnet/WordInDotnet.asp
I have integrated this control in my vb.net (desktop) application. I load
the word template document in which there are several Bookmarks defined named
section1, section2, section3, section4.
On click event of a button, i want to paste a particular text inside the
word "Section1" on the particular bookmark.
"Section 1 Button1" Section1
Checkbox 1 ------------------
Checkbox 2
UpOn Clicking on Section 1 Button1, it should display cursor on the right
pane under section1 header. What it does actually, never display the cursor
but the bookmark clause takes the cursor there (But cursor does not appear
visually.) All i want to do is to show the cursor there blinking whenever i
click on Button 1 on right pane.
Dim wd As New Word.Document
Dim wa As New Word.Application
wd = objWinWordControl.document
wa = wd.Application
wd.Bookmarks.Item("Section1").Select() 'This line will take
the focus to the Section as it is a bookmark
'alreaded added in the word template, but it does not show
cursor 'blinking
over there.
On Checkbox click i have set the code to write the text under the
section1 on the right pane which is as below.
wd = objWinWordControl.document
wa = wd.Application
wa.Selection.TypeParagraph()
wa.Selection.TypeText("This is a paragraph related to Section1")
All i wanted to blink my cursor under the relevant header when i click on
button"Section1 Button1" in vb.net program
Thanks in advance.