Hmm, was not aware of this userform thing....
I found this, which supposedly creates the bookmarks in a word form. I am not sure it populates the text though. It seems that the idea of a userform is to collect data from user input. So not any support for supplementing the User Input action or replacing the User Input action via Automation.
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx
You may already have seen this.
http://msdn.microsoft.com/en-us/libr...ffice.11).aspx
I created some air code here. But not seeing any Text property or way to write to the Bookmark. It seems to be read only.
Code:
Dim myWordApp As Word.Application
Dim docNew As Word.Document
Dim docBookmark As Word.Bookmark
Set myWordApp = CreateObject("Word.Application")
myWordApp.Visible = True
Set docNew = myWordApp.Documents.Open("C:\Test\SampleDoc.docx")
For Each docBookmark In docNew.Bookmarks
Debug.Print docBookmark.Name
Next
docNew.Close
myWordApp.Quit
Set docNew = Nothing
Set myWordApp = Nothing