I have this Word document that I create from VB6 application (where I have a reference to Microsoft Word 16.0 Object Library). I have several Bookmarks in the body of the text that I populate with the data from my data base. And all of that works OK.
I can Delete all Bookmarks just fine with:
And that Deletes Bookmarks from the body and the footer.
I can populate any Bookmark in the body of the text just fine with:
Now I want to populate 2 Bookmarks in the Footer of this document, but all of my attempts fail :-(
How do you place a text in the Bookmark in the Footer of the Word document using VBA?
---- Andy
There is a great need for a sarcasm font.
I can Delete all Bookmarks just fine with:
Code:
Dim bmk As Word.Bookmark
Set ObjWord = CreateObject("Word.Application")
With ObjWord
...
For Each bmk In .ActiveDocument.Bookmarks
bmk.Delete
Next bmk
...
End With
And that Deletes Bookmarks from the body and the footer.
I can populate any Bookmark in the body of the text just fine with:
Code:
With objW.Selection
.GoTo What:=wdGoToBookmark, Name:="MyBookmark"
.TypeText Text:="My Text"
End With
Now I want to populate 2 Bookmarks in the Footer of this document, but all of my attempts fail :-(
How do you place a text in the Bookmark in the Footer of the Word document using VBA?
---- Andy
There is a great need for a sarcasm font.