Automation of Mail Merge: Access to Word

Discussion in 'OT Technology' started by Create, Apr 28, 2006.

  1. Create

    Create :free at last:

    Joined:
    Jan 4, 2006
    Messages:
    8,043
    Likes Received:
    2
    Me: I've been developing MS Access applications for some time. I have picked up some VB skills and have been programming in other languages for some time.

    Background: I currently have a data in an Access table and a Word form which populates a record per page through the mail merge function in Word.

    Current Process: Push a button in the Access application to populate the data table used for the mail merge. Open the appropriate Word document. Click through the Word Mail Merge Wizard to create the necessary documents.

    Issue: My users are fairly computer illiterate. They have trouble finding the correct Word document (despite it being the same document every time), remembering how to access the wizard, and completing the wizard (despite the fact that the only input required is to click through the steps).

    Proposed Solution: Automate the process to such an extent that my users are comfortable. Upon a single click in the Access application the data table should populate, the correct document should open in Word, and the Mail Merge should automatically complete to the point where records can be reviewed.

    I havn't a clue how to implement the proposed solution. If I were to guess, I would say that there exists VB functions to perform each step, including a method to send a command to the OS to open the Word document. Is this correct? If so, what are the function names I would need? What is a good reference for the included VB function libraries?

    Any guru's out there? If you can offer any hints I would greatly appreciate it. I've left the discriptions somewhat vague as there are multiple situations where I can implement these types of solutions.

    Thank you in advance.
     
  2. Create

    Create :free at last:

    Joined:
    Jan 4, 2006
    Messages:
    8,043
    Likes Received:
    2
    The function to open Word from Access is is ShellExecute(). I've implemented this in a playpen and it seems to function exactly as described. The next step, I think, is to create a Word macro to pull through the merge.

    Despite the aparrent lack of interest, I'll update when I get it functioning correctly.
     

Share This Page