Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Finnegan's Mom
 
Posts: n/a
Default 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   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP
 
Posts: n/a
Default 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

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I change the "Automatic" font color in Microsoft Word? Laura Microsoft Word Help 9 April 29th 23 08:48 AM
Can't uncheck automatic style updating alex Microsoft Word Help 2 August 18th 05 09:00 PM
Word should have an option for automatic word division by default. Miguel Megias Microsoft Word Help 2 April 21st 05 06:55 PM
Stopping automatic bullet formatting when formatting is turned off SolcorpianWriter Microsoft Word Help 2 December 23rd 04 06:25 AM
How can I stop automatic capitalisation after ? or ! in Word? Bystander Microsoft Word Help 4 December 4th 04 11:19 PM


All times are GMT +1. The time now is 08:54 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"