Hi i'm coding with visual basic6 and i need to insert values in bookmarks in a word document template. The document template has bookmarks within its header. If i'm at the body of the text and i try even GoTo a bookmark in the header it gives me an error" Word Cannot find the requested bookmark". When it does exist but only in the header. What the snippet of code does is to enter the page header and then goto to the bookmarked selection on the header.
This is a snippet of my code:
dim wordapp As Word.Application
wordapp.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader 'To go into the page header
wordapp.Selection.GoTo What:=wdGoToBookmark, name:=bookmarkinheader
Is there something i'm missing?? it will give me the error after the execution of that line of code. And its sending me A wall
Your help would be appretiated Thanks
This is a snippet of my code:
dim wordapp As Word.Application
wordapp.ActiveWindow.ActivePane.View.SeekView = wdSeekCurrentPageHeader 'To go into the page header
wordapp.Selection.GoTo What:=wdGoToBookmark, name:=bookmarkinheader
Is there something i'm missing?? it will give me the error after the execution of that line of code. And its sending me A wall
Your help would be appretiated Thanks