Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Problems with bookmarks being in the header of a document

Status
Not open for further replies.

andrewecu

Programmer
Feb 18, 2002
3
AU
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 :p

Your help would be appretiated :) Thanks
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top