Reply
 
Thread Tools Display Modes
  #1   Report Post  
FJB
 
Posts: n/a
Default Macro to add data to merged document

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

  #2   Report Post  
Graham Mayor
 
Posts: n/a
Default

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}}


--

Graham Mayor - Word MVP

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


FJB wrote:
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



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
macro preventing document to be opened jimk Microsoft Word Help 5 July 14th 05 11:10 PM
How do keep blank lines when merging a document with the data and. ftroop Mailmerge 1 March 30th 05 04:27 PM
How do I create a macro to data sort in a table within a protecte. Keenly52 Tables 5 March 29th 05 08:38 AM
Specific Email Merge w/ Specific Attachements Mark B Mailmerge 9 February 21st 05 05:10 AM
faxing from word 2003 mail merge Jo_Wizz Mailmerge 2 January 25th 05 11:31 AM


All times are GMT +1. The time now is 10:52 AM.

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"