Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Chris Miller on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Repeat same text throughout document 2

Status
Not open for further replies.

tamtam

MIS
Nov 22, 1999
29
US
I have a Word document that is like a form letter. In this letter, I would like to enter someone's name once and then have it automatically repeat the name is certain places throughout the document. It is similar to a Mail Merge, except that I don't want to do it in mass, just one-at-a-time, when needed. I am using Word 2000. I tried to insert a text form field 4 times and give them all the same Bookmark name. Then I protected the form and filled in the first field. I was hoping it would automatically fill-in the other 3 fields with the text I entered, but it didn't. Can something like this be done?
 
Hi,

Yes, Mail Merge.

Add the record to the data source table.

Activate the Mail Merge toolbar.

Set document to letter.

Toggle View Merged data to show that actual data value.

Cycle thru data rows using Previous Record and Next Record to find the record.

Skip,
[sub]
[glasses] [red]Be advised:[/red] When you ignite a firecracker in a bowl of vanilla, chocolate & strawberry ice cream, you get...
Neopolitan Blownapart! [tongue][/sub]

 
Skip and I have this difference in opinion on the best way to do this. So I will give my side again.

You sort of had the right idea with the same name.

Your original text formfield: Make sure it has Calculate on exit checked.

Where ever you want the same text that is input into that formfield:

Press Ctrl-F9. Type in the name of the original text formfield. That's it.

You can do this anywhere, as many times as you like. The name of the formfield is the Bookmark field when you right click it, and select Properties.

Gerry
 
Gerry,

Thanks for the information. It worked great! This is exactly what I was looking for. I already shared this information with another user and they said that this will save them a ton of time creating custom training certificates on demand! Thanks again!

Tammy
 
Hi Tammy,

I'm with Gerry on technique for this one. As he seems to have helped you, have you considered awarding him a star - just click the link at the bottom left of his post where it says "Thank fumei for this valuable post!"


Enjoy,
Tony

--------------------------------------------------------------------------------------------
We want to help you; help us to do it by reading this: Before you ask a question.
Excel VBA Training and more Help at VBAExpress[
 
Is it possible to do this same process but have different font formating in different locations? Everytime I try this method in my document, it carries the formatting of the original field...whether I have the "Preserve formatting during updates" box checked or not.

-Rod
 
Yes you can. However, it means using Styles. Simply make the field that is GETTING updated (the one using Ctrl-F9, not the original "source" field) a different Style. Note: manual format can change the font etc., but you need to unprotect the document first.

If you use Styles, then the inserted results will take on the attributes of the style, NOT the attributes of the original formfield. Do not forget that you can use CHARACTER styles. These allow you to make the fields different from the rest of the paragraph.

For example using a bolded character style could take the result of formfield, and update it where ever, but be bolded.

Gerry
See my Paintings and Sculpture
 
Thanks Gerry. It worked just as I intended it to. This will be benefitial in creating this template.

-Rod
 
Hi folks,

Another way of applying individual formatting to the reference field (ie the one created via Ctrl-F9) is to use the Charformat switch.

To get the results you want for an individual field, select it and press Shift-F9 to expand the field code. It should look something like:
{Text1}
At the end of this field, add a Charformat switch, thus:
{Text1 \@ Charformat}
Then, simply format at least the first character in the field name with the font attributes that you want for the whole field (eg bold, italics, backround colour, whatever). When you're done, simply press F9 to update.

The potential advantage of this approach is that the repeated value can be made to stand out from the rest of the text. If you don't need that, though, management by style is the way to go.

Cheers
 
And thanks to macropod for, as usual, expanding knowledge and options available. However, while certainly viable, it is a number of steps more. Word is designed around styles. It really is, and styles are the most efficient way to use Word.

Gerry
See my Paintings and Sculpture
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top