Results 1 to 2 of 2
  1. #1
    New Lounger
    Join Date
    Nov 2005
    Thanked 0 Times in 0 Posts

    Document Properties = Mergefield (WD97 SR2B)

    I have a template that mailmerges to formletters. The user enters query options that identify a single record from the source.

    I would like to set the document property 'Title' to be a combination of the values of some of the mergefields so that there is a default file save name set. I can set the Title property if I'm using a userform... but how can I set it to equal a mergefield?

    I know that I can copy standard word macros to the template, intercept and customize them and I think that perhaps I need to intercept one of the merge macros. I can't figure out which one though or how exactly to reference a specific mergefield and assign the value to the Title property of the new form letters...

    Any ideas?


  2. #2
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Silicon Valley, USA
    Thanked 93 Times in 89 Posts

    Re: Document Properties = Mergefield (WD97 SR2B)

    Merging is complicated, so I personally would hesitate to replace that with VBA. Maybe someone else can show the way there.

    Instead, it seems simpler to intercept the FileSaveAs procedure and calculate the proposed new name at that time. If the merge fields are difficult to identify at that point, a few possible solutions come to mind. The first, since you only have one record, is that you might be able to pre-mark those areas with bookmarks; I just don't know whether they will survive the merge. The second is that you might be able to use a SET fields to store the calculated combination of merge fields as a variable in the document, as well as merging them to their "visible" locations. A third might be to rely on styles to locate the text.

Posting Permissions

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