Results 1 to 7 of 7
  1. #1
    New Lounger
    Join Date
    Oct 2002
    Location
    Orlando, Florida, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mergefield formatting (Word 2000 SR1)

    I have a merge form where I need to print a mergefield with multiple database entries in a list with "and" before the last occurrence.
    Example: (mergefield witness) lists all the witnesses from the database - I format it with a ",s" to get:
    "John Smith, Mary Jones Brown, Rhonda Fleming"
    However I need to get: "John Smith, Mary Jones Brown, and Rhonda Fleming"

    Is there any way to do this?

  2. #2
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mergefield formatting (Word 2000 SR1)

    What sort of database is the data coming from? If it's Access (or something Access can talk to), there is hope.
    Wendell

  3. #3
    New Lounger
    Join Date
    Oct 2002
    Location
    Orlando, Florida, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mergefield formatting (Word 2000 SR1)

    I'm not sure what the database is - but it is not Access - This is a Perfect Law, AIIM application.

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mergefield formatting (Word 2000 SR1)

    Unfortunately, I don't know anything about Perfect Law, and a Google search didn't turn up anything useful. It did come up with a bunch of hits for the Corel suite WordPerfect Law Office but I presume that isn't what you are dealing with. Can you provide more details - in particular what the field code looks like that you are try to format?
    Wendell

  5. #5
    New Lounger
    Join Date
    Oct 2002
    Location
    Orlando, Florida, USA
    Posts
    4
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mergefield formatting (Word 2000 SR1)

    The field code looks like this:
    { mergefield inventor_fullname ,s} This produces all the inventors on a line with a comma and a space

  6. #6
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mergefield formatting (Word 2000 SR1)

    This is a bit of a puzzle - I can't find any information that documents the use of the s switch with mergefield as a field code. There is a reference to a database field that uses s to specify the SQL to be used to get information out of a database, but I've never seen it used. Can you open the Merge Helper in the master document and see what the data source for it is? Perhaps one of the other Loungers can help us out here.
    Wendell

  7. #7
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mergefield formatting (Word 2000 SR1)

    Hi Helen:
    One way would be to put in a field, e.g. WitNum, in your database so you could code the last witness. Say you give the last one a value of "L". Then you could use the following syntax in your mail merge main document:

    {IF {LastWit} <> L "{Mergefield FirstName} {Mergefield LastName}," "and {Mergefield FirstName} {Mergefield LastName}." }

    This will only put an "and" and a period when the field = L, your last witness.

Posting Permissions

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