Results 1 to 8 of 8
  1. #1
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mail merge (Word03)

    I am creating a mail merge Word orientation handbook that is to be unit specific. The data to make it unit specific is in an Access database. The
    section layout is designed to go inline with the checklist used for orientation.

    I have gotten the basics working as I want it to. I have also created an IF statement to display material if the department is ICU it would display specific text that isn't otherwise displayed.

    Here are my issues: I have more skills than most users at the facility. If I was to leave the facility I want something that isn't going to be difficult
    for them to maintained and improve on with time. I am concerned that if I hide material in IF statements someone else will not know how to deal with
    them. I am planning to create a manual to go with the handbook so I am thinking IF statements may work.

    I will have sections that only apply to one or two units. I will not be able to just tack on the material to the end of the main document because it
    would mess up the flow. For example the ER has a sub section on Radios that needs to be included in the General Operation section of the handbook not at
    the end. My question is how to best bring in information like this. Is there a way to insert a file or show hidden text. For example { IF Department =
    Emergency Room, Bookmark unhidden, Bookmark hidden }

    Any ideas would be appreciated to keep this project usable for basic users and slightly above basic users (me)?

    Thank you

    Fay

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail merge (Word03)

    You can use the IF field to do something like this:

    insert literal text:

    { IF {MERGEFIELD Department } = "ICU" "lots of text here, it can contain paragraph ends, formatting etcetera" "" }

    or an AutoText fragment:

    { IF {MERGEFIELD Department } = "ICU" "{ AUTOTEXT "ICUText" }" "" }

    or text from another document:

    { IF { MERGEFIELD Department } = "ICU" "{ INCLUDETEXT "C:WordICU.doc" }" "" }

    The brackets { } are the field brackets that are displayed when you display field codes; you shouldn't type them yourself. The are inserted automatically when you
    - Insert a mail merge field.
    - Insert a field using Insert | Field...
    - Press Ctrl+F9 to create a field manually.

  3. #3
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail merge (Word03)

    Good evening Hans. Thanks the IncludeText was exactly what I needed. This allows anyone update the secondary file without worrying about programming.

    Oops I thought I went further and referenced a bookmark. Thinking about managing the overall project. Using bookmarks will allow me to keep a separate file for each department not for each separate entries. Is there a way to combine bookmark with the IncludeText? Checking the literature now.

    Fay

  4. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail merge (Word03)

    I'm sorry, I'm not sure what exactly you mean by combining a bookmark and IncludeText.

  5. #5
    Super Moderator
    Join Date
    May 2002
    Location
    Canberra, Australian Capital Territory, Australia
    Posts
    5,054
    Thanks
    2
    Thanked 417 Times in 346 Posts

    Re: Mail merge (Word03)

    Hi Fay,

    You can use a bookmark reference in an INCLUDETEXT field to pull in only the prtion of the source document that has that bookmark. Thus, if one target document needs the whole of the source document, use the INCLUDETEXT field without a bookmark reference. In another target document needs only part of the source document, bookmark that portion and use the INCLUDETEXT field with the bookmark reference.

    If you need to insert different portions of the source document in different places, you'll need to bookmark each in the source document and have a separate INCLUDETEXT field, with an appropriate bookmark reference, for each in the target document.

    Since you're using IF tests on MERGEFIELDS for these, it's probably easiest to create one instance of the complete field, then copy & paste it to wherever you want and edit/delete the bookmark references to suit.

    Cheers
    Cheers,

    Paul Edstein
    [MS MVP - Word]

  6. #6
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail merge (Word03)

    Thanks, referenceing a bookmark is exactly what I want to do. I am not sure how that code would be. I had tried to use the web fromat of
    { IF {MERGEFIELD Department } = Emergency Room { INCLUDETEXT C:EducationOrientation Revisionmerci.doc#merci " } "" }
    The #merci did not work. If I removed that then I get the whole document.

    I finally figured it out. It was the placement of the quote I was putting the quote to the left of the bookmark not the right.

    Thank you.

    Fay

  7. #7
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mail merge (Word03)

    The "code" for INCLUDETEXT with a bookmark is

    { INCLUDETEXT "C:EducationOrientation Revisionmerci.doc" merci }

    The whole would become

    { IF {MERGEFIELD Department } = "Emergency Room" "{ INCLUDETEXT "C:EducationOrientation Revisionmerci.doc" merci }" "" }

    Note the way quotes are used.

  8. #8
    5 Star Lounger
    Join Date
    Jul 2001
    Location
    NJ, USA
    Posts
    617
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mail merge (Word03)

    Thanks Hans I actually got it figured out this time. Another avenue has been opened. Fay

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •