Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
D. Wentzler D. Wentzler is offline
external usenet poster
 
Posts: 1
Default Can I create logic to include/omit sections of text?

Is it possible to create a mail merge letter that inserts/omits sections of
formatted text (including tables or charts) based on indicators in my data
source? Each section would also contain data fields to be populated from the
source data. Could the "inserts" be pulled from a separate Word file in to
the merge document? Thanks!
  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Heather Heather is offline
external usenet poster
 
Posts: 22
Default Can I create logic to include/omit sections of text?

Is it possible to create a mail merge letter that inserts/omits sections of
formatted text (including tables or charts) based on indicators in my data
source? Each section would also contain data fields to be populated from the
source data. Could the "inserts" be pulled from a separate Word file in to
the merge document? Thanks!


I've been working on something similar for a gigantic mail merge. Part
of the data I'm using is pulling data from a csv file, and some of what
I'm doing is inserting text from a separate word file based on the data
in the merge.

{if {mergefield admittype}="HS" {includetext c:\\frosh1.doc
bookmark_frosh_1} ""}

So there - if the merge field from my csv file is equal to "HS", I'm
telling word to include the text in file frosh1.doc. Graham Mayer saved
my butt this morning by telling me to include a bookmark in the
frosh1.doc (I selected the text up to the paragraph mark and then
bookmarked it) so that the line in my letter doesn't break. The double
quotation marks tell the merge that if the 'admittype' field isn't HS,
leave blank (no data inserted).

Something I was fiddling around with today for the addresses:

{if {mergefield "Line4"}="Canada" "" {Mergefield "Line4"}}

That statement is saying if the merge field Line4 in my csv file says
Canada, don't add it. Otherwise, merge the data in. The letters I'll be
merging are being sent from a Canadian address, so we only need to put
the country if they're going elsewhere.

Hope that helps. The google groups here are pretty amazing...I don't
know what I'd do without them!!

Heather

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
Creating dynamic cross reference links in a Word document torajudo Microsoft Word Help 5 April 27th 23 08:57 PM
Open word in text mode Jay Douglas Microsoft Word Help 9 February 15th 06 08:30 AM
Wandering text box Jim K Microsoft Word Help 7 December 23rd 05 11:27 PM
Word applies direct format on File open Uriel Microsoft Word Help 16 November 27th 05 07:22 PM
create a text link using a text box for forms ClassyIrish Microsoft Word Help 12 November 21st 05 03:51 AM


All times are GMT +1. The time now is 07:12 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"