M
Mike
Hi,
I have a template with 2 formfields containing the following
bookmarks:
- Name
- Place
The formfields are filled using a userform:
ActiveDocument.FormFields("Name").Result = Formname.Controls(Name)
ActiveDocument.FormFields("Place").Result = Formname.Controls(Place)
Then I want to insert a 'new page section' and in the new section I
want to insert the same template again, with thus the same bookmarks.
To prevent multiple bookmarks with the same name, I delete all
bookmarks before I make the new page section using:
ActiveDocument.Bookmarks("Name").Delete
ActiveDocument.Bookmarks("Place").Delete
I then insert the template on the second page.
What I want is to use the userform again to now fill the bookmarks on
the second page. However, if I use
ActiveDocument.FormFields("Name").Result = Formname.Controls(Name)
ActiveDocument.FormFields("Place").Result = Formname.Controls(Place)
again (assuming the Name bookmark is now on the second page due to the
template and having deleted all other bookmarks), the formfields on
the 1st page are filled again in stead of the second page.
It looks like the bookmark from the first page is not entirely
deleted! If I however unprotect the page and look in the property of
the formfield of the first page, there is no bookmark!
Can someone help me please?
Thanks, Mike
I have a template with 2 formfields containing the following
bookmarks:
- Name
- Place
The formfields are filled using a userform:
ActiveDocument.FormFields("Name").Result = Formname.Controls(Name)
ActiveDocument.FormFields("Place").Result = Formname.Controls(Place)
Then I want to insert a 'new page section' and in the new section I
want to insert the same template again, with thus the same bookmarks.
To prevent multiple bookmarks with the same name, I delete all
bookmarks before I make the new page section using:
ActiveDocument.Bookmarks("Name").Delete
ActiveDocument.Bookmarks("Place").Delete
I then insert the template on the second page.
What I want is to use the userform again to now fill the bookmarks on
the second page. However, if I use
ActiveDocument.FormFields("Name").Result = Formname.Controls(Name)
ActiveDocument.FormFields("Place").Result = Formname.Controls(Place)
again (assuming the Name bookmark is now on the second page due to the
template and having deleted all other bookmarks), the formfields on
the 1st page are filled again in stead of the second page.
It looks like the bookmark from the first page is not entirely
deleted! If I however unprotect the page and look in the property of
the formfield of the first page, there is no bookmark!
Can someone help me please?
Thanks, Mike