How to open a word document (Mail Merge) and filling it with data from an Access Form 2010 using VBA? RRS feed

  • Question

  • Hello,

    I have a MS Access 2010 application, and have 10 MS Word templates. This application is use to maintain the contacts details of the person. When the user opens a word template, it will open a word document and user need to run a macro in word. When the macro runs it will prompt to enter "Contact ID of the person". When we enter the contact ID of particular person, details of that person will get populated from accesss DB to MS word and it saves the document in 11112013.doc format.
    Our client requirement is:
    User opens form CONTACTS
    User finds single record to be used – CONTACTID is identifier to be used for selection
    User clicks button to open form frm_MAIL_MERGE  
    Frm_MAIL_MERGE has a dropdown combo box that reads the folder location where the application resides and displays all .DOTM files (that is template files)
    User selects single .dotm file for merge
    Frm_MAIL_MERGE has either drop down to select CONTACTID or UNBOUND data field for user to type in CONTACTID number
    User enters CONTACTID to be used for the mail merge
    User selects SUBMIT
    Application merges selected .dotm file with the information in table CONTACTS for the selected CONTACTID
    Merged document is saved on the user Desktop as xxx.docx

    Could anyone please help me on this requirement with the sample MS Access application. Looking forward for your reply.

    Thanks and Warm Regards,

    Monday, November 18, 2013 11:11 AM


All replies