none
How to mark / automate client specific text? RRS feed

  • Question

  • Hello.

    I've got a (sort of) template for a (monthly) report. This template is used for a couple of dozen clients. The template contains text that applies to all clients, text that applies to some clients, text that apply to only one client (and even text that applies to all clients except for one or two).

    Some texts are relatively constant but other texts change with every new (monthly) report.

    (Apart from text the document also contains client specific and non-client specific numbers and tables.)


    At the moment I'm using a marker like:

    {Client: ClientNr1, ClientNr2 |

    This is text specific for ClientNr1 and ClientNr2.}

    2 questions:

    • Do you know of a smarter way to tackle this issue? A database approach for the text doesn't seem the way to go, given the frequency of changes in the text, the reviewing process of the text and the number of exceptions and client specific text.
    • Do you know of some sample code, or may be even a library, on processing the markers and coming up with a report that is specific for 1 client?
    Friday, April 6, 2012 1:06 PM

Answers

  • Hi Gert,

    If the client-specific information always goes into the same location(s), simply have a set of mergefields at those locations pointing to corresponding fields in the data source and make the edits there. The only fields that need to incorporate the IF tests in the mailmerge main document are those whose contents can be managed for multiple clients by someone who's proficient in maintaining them. Indeed, if you wanted to, you could use IF tests in, say an Excel workbook itself to do all of that, with formulae referencing lokup tables or whatever on another worksheet.

    In the long-run, you may want to develop a database to manage the data and generate the reports directly, or at least use as the mailmerge datasource.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, April 9, 2012 11:52 AM

All replies

  • Hi GertBert,

    There's no reason a mailmerge couldn't handle this using, say, an Excel data source with columns that designate which text is associated with which client. The entries could be as simple as: X or blank; Y or N; or a number. In your mailmerge main document, you'd have a series of IF tests that check each field's value in order to determine which variant to output. For a given field, the IF test would be coded like:

    {IF{MERGEFIELD Fld1}= "X" "Text to output"}
    or
    {IF{MERGEFIELD Fld1}= "Y" "Text to output for Y" "Text to output for not Y"}
    or
    IF{MERGEFIELD Fld1}= "1" "Text to output for 1"}IF{MERGEFIELD Fld1}= "2" "Text to output for 2"}IF{MERGEFIELD Fld1}= "3" "Text to output for 3"}
    where 'Fld1' is the name of the field in your data source.

    Indeed, where the data vary by client (eg client names), it's as easy as simply inserting those data into the datasource and using the corresponding mergefields directly:
    «Name»

    Note: The field brace pairs (ie '{ }') for the above examples are created via Ctrl-F9 - you can't simply type them or copy & paste them from this message. Likewise, you can't type or copy & paste the chevrons (ie '« »') - they're part of the actual mergefields, which you can insert from the mailmerge toolbar.


    Cheers
    Paul Edstein
    [MS MVP - Word]


    Friday, April 6, 2012 11:52 PM
  • Hi Paul,

    Thanks for your reply.

    Seems like a simple way to tackle the problem.

    The things that make me hesitant are:

    • The review process of the texts. The "template" is being reviewed by a lot of people from different departments for all clients at once. Those people review and edit the text (with track changes). Those changes will be lost when updating the fields (when not done within the fields). Another potential issue: How do they know which text is for what client? (Showing all fields (with <ALT>+<F9>) could be a possibility, but is not very user friendly and shows other codes as well.)
    • And the maintainability for other people than myself. Most people don't have knowledge of mail merge, fields etc.

    Hope to hear your thoughts on this.

    Gert

    Monday, April 9, 2012 10:20 AM
  • Hi Gert,

    If the client-specific information always goes into the same location(s), simply have a set of mergefields at those locations pointing to corresponding fields in the data source and make the edits there. The only fields that need to incorporate the IF tests in the mailmerge main document are those whose contents can be managed for multiple clients by someone who's proficient in maintaining them. Indeed, if you wanted to, you could use IF tests in, say an Excel workbook itself to do all of that, with formulae referencing lokup tables or whatever on another worksheet.

    In the long-run, you may want to develop a database to manage the data and generate the reports directly, or at least use as the mailmerge datasource.


    Cheers
    Paul Edstein
    [MS MVP - Word]

    Monday, April 9, 2012 11:52 AM
  • Thank you Paul. (Apologies for the late reply.)

    Excel could be a solution in between (everything in Word versus everything in a database).

    Problem with storing everything in Excel is the number of links (to Excel) already in the Word document.

    Monday, April 30, 2012 11:28 AM