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!

Is it possible to use bookmarks with footers (MSWord/C#) ?

Status
Not open for further replies.

dorub

Programmer
Oct 15, 2002
12
0
0
RO
I am creating a MS Word (VS 2003/MSWord 2003) document based on another document as a template.
I succeeded replacing the text I wanted using bookmarks but I found myself in trouble trying to do the same thing with the Footer section of the document.
My Footer contains a text line,a 2/2 table and a "page x of y" on the bottom. All I need is to insert 2 names in the second row of the table , respectively table(2,1) and table(2,2).


 
I found this code related to my problem :
object obBM1 = "Bookmark1";
Word.Range rngRange1 = Word_App.ActiveDocument.Bookmarks.Item(ref obBM1).Range;
but I get a compiler error that Word.Bookmarks does not contain a definition for 'Item'. How Am I suppose to address to a specific bookmark from the Bookmarks collection ?
Nobody can help me ?
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top