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 / February 2004

Tip: Looking for answers? Try searching our database.

Help: Mail Merge Macro Problem

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
malycom - 17 Feb 2004 09:21 GMT
Hi

I am having trouble trying to write some code that will allow
selected page from a document to print based on merged information.

I have quite a few mergefields in both pages of the document but th
two main Mergefields are {MERGEFIELD "Feb_03_ZMK"} and {MERGEFIEL
"April_03_ZMK"}.  Basically, I want to print page one of a document i
the first mergefield is showing a value greater than 0 and page 2 i
the second mergefield is showing a value greater than 0.  I would lik
no pages to be printed if both fields are 0.

I have no idea how to go about this.  Very new to trying to use VBA s
as much info as possible would be a great help.

Kind regards

malyco
Graham Mayor - 18 Feb 2004 08:16 GMT
What you propose is potentially quite complicated, and success would largely
depend on what is on the two pages of your document. A simpler plan would be
to insert the variable text according to the field content, rather than
select from two pages which presumably have further field codes. Then it
would be quite simple to insert the required bits of text using Autotext or
Includetext fields eg
{IF {MERGEFIELD Feb_03_ZMK} > 0 "Insert this"}{IF {MERGEFIELD April_03_ZMK}
> 0 "Insert this"}
"Insert this" can be just about anything.

You can repeat this structure wherever the text varies.

Signature

<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>
    Graham Mayor -  Word MVP
      E-mail gmayor@mvps.org
     Web site www.gmayor.com
 Word MVP web site www.mvps.org/word
<>>< ><<> ><<> <>>< ><<> <>>< <>>< ><<>

> Hi
>
[quoted text clipped - 19 lines]
> ~~View and post usenet messages directly from
> http://www.ExcelForum.com/
 
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.