Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Automatic search/replace
Hello, I'm unsure if I'm posting in the correct area--but I'm creating a template with generic placeholders for information--right now, this generic placeholder is in brackets, like this: [insert product name here]. These are throughout the template. When a user creates a new document based on that template, I'd like a dialog box to appear the first time that person opens the new document, allowing the user to type the product name, and then have all the [insert product name here]'s replaced with what the user typed. Is this possible? TIA for your help. -- Finnegan's MomPosted from - http://www.officehelp.in |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Automatic search/replace
If there is only one piece of information to be inserted, you can get away
with an InputBox. In place of your [insert product name here], I would insert a { DOCVARIABLE varProductName } field in each location and then use the following code in an autonew() macro in the template: With ActiveDocument .Variables("varProductName").Value = InputBox("Enter Product Name") .Range.Fields.Update End With If there are multiple pieces of information, you could just repeat the above two lines of code modified for each piece, but it is better to use a UserForm: See the article "How to create a Userform" at: http://word.mvps.org/FAQs/Userforms/CreateAUserForm.htm -- Hope this helps. Please reply to the newsgroup unless you wish to avail yourself of my services on a paid consulting basis. Doug Robbins - Word MVP "Finnegan's Mom" wrote in message ... Hello, I'm unsure if I'm posting in the correct area--but I'm creating a template with generic placeholders for information--right now, this generic placeholder is in brackets, like this: [insert product name here]. These are throughout the template. When a user creates a new document based on that template, I'd like a dialog box to appear the first time that person opens the new document, allowing the user to type the product name, and then have all the [insert product name here]'s replaced with what the user typed. Is this possible? TIA for your help. -- Finnegan's MomPosted from - http://www.officehelp.in |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
How do I change the "Automatic" font color in Microsoft Word? | Microsoft Word Help | |||
Can't uncheck automatic style updating | Microsoft Word Help | |||
Word should have an option for automatic word division by default. | Microsoft Word Help | |||
Stopping automatic bullet formatting when formatting is turned off | Microsoft Word Help | |||
How can I stop automatic capitalisation after ? or ! in Word? | Microsoft Word Help |