Results 1 to 1 of 1

Thread: [FAQ's: OD] How do I create a Mailmerge?

  1. #1

    Thread Starter
    Ex-Super Mod RobDog888's Avatar
    Join Date
    Apr 2001
    Location
    LA, Calif. Raiders #1 AKA:Gangsta Yoda™
    Posts
    60,710

    [FAQ's: OD] How do I create a Mailmerge?

    Using Word 2003 as an example...

    There are several easy steps in creating a MailMerge document:


    Step 1 -
    Setup a new Word document and add your verbiage and any images needed in the document as shown in Fig. 1. Note: I have added highlighting and brackets as placeholders for where I wish to insert my MailMerge data for clarity reasons for this FAQ.

    Fig. 1 Click on image for larger picture






    Step 2 -
    Now that the document is ready for configuring it as a MailMerge document we ca start with setting the document type by clicking on the "Main Document Setup" button on the MailMerge toolbar (Fig. 2). If your MailMerge toolbar is not visible then select it by clicking on the "View > Toolbars > Mail Merge" menu item.

    Fig. 2






    Step 3 -
    Choose the MailMerge "Letter" document type (Fig. 3).

    Fig. 3






    Step 4 -
    Next we will setup the DataSource by clicking on the MailMerge "Open DataSource" button on the MailMerge toolbar (Fig. 4).

    Fig. 4






    Step 5 -
    Browse to where your database is located that contains the information you wish to "merge" with the document, select it and click the "Open" button (Fig. 5).

    Fig. 5 Click on image for larger picture






    Step 6 -
    Now that we are connected to our DataSource we will want to highlight the place where we want to insert a MailMerge field and then click on the "Insert Merge Fields" button on the MailMerge toolbar (Fig. 6).

    Fig. 6






    Step 7 -
    This will bring up the "Insert Merge Field" dialog window from which we can select our field and insert it into the document at the highlighted range by clicking the "Insert" button (Fig. 7).

    Fig. 7






    Step 8 -
    Then you will see the highlighted range change to a MailMerge field. You can tell the difference by the addition of the "«FieldName»" (Fig. 8). Close the "Insert Merge Field" dialog window and repeat steps 6 and 7 until all your needed merge fields have been added to the document.

    Fig. 8






    Step 9 -
    This should be the way your document looks now with the merge fields field names being shown.

    Fig. 9 Click on image for larger picture






    Step 10 -
    For easier viewing of the merge fields you can turn on highlighting of the merge fields by clicking on the "Highlight Merge Fields" button on the Mail Merge toolbar (Fig. 10).

    Fig. 10 Click on image for larger picture






    Step 11 -
    Optionally, you can perform manual sorting and filtering by clicking on the "Mail Merge REceipients" button also located on the Mail Merge toolbar (Fig. 11).

    Fig. 11






    Step 12 -
    The "Mail Merge Receipients" dialog window allows you to sort and/or select which receipients you wish to include or exclude from the merge results. Instructions are on the Mail Merge Receipients dialog window (Fig. 12).

    Fig. 12






    Step 13 -
    If you like you can toggle between viewing the merge fields in the document and a preview of the merged data by clicking on the "View Merged Data" button (Fig. 13).

    Fig. 13






    Step 14 -
    Example of "View Merged Data" turned on and "Highlight Merge Fields" also turned on (Fig. 14).

    Fig. 14 Click on image for larger picture






    Step 15 -
    Example of "View Merged Data" turned on with "Highlighting Merge Fields" turned off (Fig. 15).

    Fig. 15 Click on image for larger picture






    Once you have your MailMerge document you can also automate and modify it via VB 6 or .NET etc.

    See my other OD FAQ thread coming soon - How do I modify/execute a Word MailMerge document?

    Meow!
    Last edited by RobDog888; Aug 3rd, 2006 at 03:30 AM.
    VB/Office Guru™ (AKA: Gangsta Yoda®)
    I dont answer coding questions via PM. Please post a thread in the appropriate forum.

    Microsoft MVP 2006-2011
    Office Development FAQ (C#, VB.NET, VB 6, VBA)
    Senior Jedi Software Engineer MCP (VB 6 & .NET), BSEE, CET
    If a post has helped you then Please Rate it!
    Reps & Rating PostsVS.NET on Vista Multiple .NET Framework Versions Office Primary Interop AssembliesVB/Office Guru™ Word SpellChecker™.NETVB/Office Guru™ Word SpellChecker™ VB6VB.NET Attributes Ex.Outlook Global Address ListAPI Viewer utility.NET API Viewer Utility
    System: Intel i7 6850K, Geforce GTX1060, Samsung M.2 1 TB & SATA 500 GB, 32 GBs DDR4 3300 Quad Channel RAM, 2 Viewsonic 24" LCDs, Windows 10, Office 2016, VS 2019, VB6 SP6

Posting Permissions

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



Click Here to Expand Forum to Full Width