Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / Word / Mailmerge and Fax / August 2005

Tip: Looking for answers? Try searching our database.

Macro to add data to merged document

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
FJB - 08 Aug 2005 21:50 GMT
I work in an area of a company that reviews accounts and recommends
their closure, if necessary. The form which must be submitted for each
account has several standard fields (from a database) but has four
options in the recommendation section. Is there a way to write a macro
so that whatever the value of the "category" field (six options)
would determine what is printed in the recommendation section.

Many thanks
Graham Mayor - 09 Aug 2005 06:22 GMT
You don't need a macro but a field.
Create six texts that correspond with your six recommendations and name them
the same as the content of the appropriate category field either as autotext
entries, documents or bookmarked sections of a document. You can then insert
the content using either a autotext field or an includetext field thus:

{Autotext "{Mergefield Category}"}
or
{Includetext "c:\\pathname\\{Mergefield Catergory}.doc" }
or
{Includetext "c:\\pathname\\docname.doc {Mergefield Category}}

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor -  Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

> I work in an area of a company that reviews accounts and recommends
> their closure, if necessary. The form which must be submitted for each
[quoted text clipped - 4 lines]
>
> Many thanks
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.