Using text box fields to populate bookmarks or other text bx

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Using text box fields to populate bookmarks or other text bx

Post by ABabeNChrist »

I have a document that has 12 locations where a clients name would be entered, I’m trying figure a simple approach so as to only have to enter once. I thought of maybe using a text box field and on exit to populate other text boxes or bookmarks with VBA, just not sure how.

User avatar
HansV
Administrator
Posts: 78527
Joined: 16 Jan 2010, 00:14
Status: Microsoft MVP
Location: Wageningen, The Netherlands

Re: Using text box fields to populate bookmarks or other tex

Post by HansV »

This is traditionally done by inserting legacy text formfields into the document. Double click a text formfield to set two properties:
- Assign a meaningful bookmark name.
- Tick the check box "Calculate on Exit".
x608.png
Click in another location where you want to refer to the formfield, press Ctrl+F9 and enter the name of the bookmark:
x609.png
Then press F9 to hide the field code.

This method requires that you protect the document for forms, at least the sections containing formfields. No code is required.
You do not have the required permissions to view the files attached to this post.
Best wishes,
Hans

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: Using text box fields to populate bookmarks or other tex

Post by ABabeNChrist »

Thank you Hans
After reading your suggestion it all comes back and I now remember :fanfare:
it’s been a while since I’ve done this.
:thankyou:

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Using text box fields to populate bookmarks or other tex

Post by macropod »

Just to add to Hans' advice, the field creation he's outlined does the same as inserting a cross-reference to the formfield's internal bookmark name via Insert|Cross-reference.
Paul Edstein
[Fmr MS MVP - Word]

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: Using text box fields to populate bookmarks or other tex

Post by ABabeNChrist »

I’m having a problem with my font size. My text box form field is a size 18 and 3 of my bookmarks are a size 11. But they keep resorting back to the form field font size of 18. And my field code looks like so CLIENTNAME \* MERGEFORMAT

User avatar
macropod
4StarLounger
Posts: 508
Joined: 17 Dec 2010, 03:14

Re: Using text box fields to populate bookmarks or other tex

Post by macropod »

First off, I'd lose the \* MERGEFORMAT switch! If that's not sufficient, use {REF CLIENTNAME \* Charformat} and format the 'R' in 'REF' (or even the whole field) with the desired font.
Paul Edstein
[Fmr MS MVP - Word]

ABabeNChrist
SilverLounger
Posts: 1868
Joined: 25 Jan 2010, 14:00
Location: Conroe, Texas

Re: Using text box fields to populate bookmarks or other tex

Post by ABabeNChrist »

Nice seeing you Paul, thank you for your help, your suggestion worked perfect :grin: