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

Tip: Looking for answers? Try searching our database.

don't want to hardcode if statements if possible

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Gay Dietz - 17 Sep 2004 16:24 GMT
I am doing a merge with a .dat file that is created by a
company that hosts our application for us so I have no
control on adding new fields very easily. Business owner
needs to me to display text based on conditions on 2
mergefields (subscriber_state & primary_diag - we'll
refer to them as SS & PD respectively). If SS = 'MD',
then I need to check if PD is in a certain set of data.
IF SS = 'VA', then I need to check if PD is in a
different set of data.

For instance, for MD, I need to check if PD is one of the
following:
311
289
452

etc..

now, criterion to check if match differs per state and
may change periodically. I do not want to hard code in
word document if SS = MD, check if 311, etc.. I would
like to be able to change the criterion outside the word
documents (because we have 50+ documents to maintain and
I hate to test each one for all states and criterion). I
was hoping to maybe have .txt files or something like
that that I could reference adn just maintain the .txt
files.

Any thoughts or is this request clear as mud (I
apologize. lack of sleep due to just having triplets).

Thanks in advance for any suggestions...
Peter Jamieson - 17 Sep 2004 19:27 GMT
> Any thoughts or is this request clear as mud

The requirement is clear. It's less clear what options are available to you.

> (I
> apologize. lack of sleep due to just having triplets).

Sheesh, best of luck! (FWIW my niece-in-law is a triplet and she is just
great.)

Probably the simplest approach if you have enough control over the merge
applications is to define all the relevant IF statements inside a separate
Word .doc file that you include using an INCLUDETEXT field. Then, when the
conditions need to change, you change the included .doc and all the merge
applications that INCLUDETEXT that file should change without any additional
effort from you.

Depending on what you are attempting, you may need to avoid INCLUDETEXTing
the last paragraph mark in the incudeteted document, in which case,
a. select everything in the includetexted file except the final paragraph
mark and bookmark it with a name, e.g. torso
b. use
{ INCLUDETEXT "<the path name of your file with doubled-up backslashes>"
"torso" }
in your mail mere main document

Whatever you do, test, test, test.

Signature

Peter Jamieson

> I am doing a merge with a .dat file that is created by a
> company that hosts our application for us so I have no
[quoted text clipped - 28 lines]
>
> Thanks in advance for any suggestions...
 
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.