![]() |
#1
|
|||
|
|||
![]()
I am not a programmer, but I'm trying to help a friend with document automation.
In a Word letter, I have constructed a Dialogue Box and the VBA code uses Bookmarks to go to specific areas and populate the letter with data entered in the Dialogue Box. This works fine on the first page. The problem is on the second page, where a Page Break is inserted by VBA code and the Header contains two Bookmarks. The plan is to go to the first Bookmark and insert text from the Dialogue Box, but the VBA code displays an error that it can't find the Bookmark. I can find that Bookmark manually in that Word document fine, so I don't know what I'm doing wrong. The code is: Selection.GoTo What:=wdGoToBookmark, Name:="Name1" Selection.TypeText Text:=txtName.Text I would be grateful for your help. Regards Useful |
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
REf Fields show Bookmark whole cell when Bookmark is created by code. | pmcpowell | Word VBA | 2 | 11-16-2019 07:05 PM |
How do I code bookmark globally for different template? | Yong Xiang | Word VBA | 17 | 02-06-2019 01:09 PM |
![]() |
Cosmo | Word | 7 | 08-24-2018 01:46 PM |
![]() |
gattaca714 | Word VBA | 2 | 03-24-2017 09:23 PM |
Find Bookmark, move to bookmark, execute code, repeat | raymm3852 | Word VBA | 10 | 04-15-2016 06:21 PM |