Results 1 to 5 of 5

Thread: Mailmerges (xp)

  1. #1
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Mailmerges (xp)

    I guess this could go in the access forum, as i have used access to create a form with which to enter the merge data. I did this so that i can use a dropdown list for a field (for the name of a rep), which through a query updates other fields with relevant telephone numbers and address of the rep. This works nicely, and then when i open the word document where i have set up the mail merge the correct information is there ready to merge.

    I cant seem to automate this though from either word or access.

    Form access i would like to open the word doc ready to do the merge. is there an easy way through a macro (RunApp)? Is there a switch i can use to identify the actual documnet after i have opened WINWORD?

    or

    from the merge doc, is there a way of opening the database form to add data to?

    oh the joys of wanting to automate! <img src=/S/brickwall.gif border=0 alt=brickwall width=25 height=15>

    M
    Thanks,

    pmatz

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Mailmerges (xp)

    In the first place, you can download a help file with information about Automation, illustrated with examples: OFFXP: Microsoft Office XP Automation Help File Available. Access Moderator <!profile=WendellB>WendellB<!/profile> has a short tutorial on Automation on his website: Automation 101, with lots of useful links.

    For this specific problem: you can use code like in the attached text file. You must set a reference to the Microsoft Word 10.0 Object Library in Tools | Options... for it to work. It uses ODBC and the 'old' way of connecting to the database.
    Attached Files Attached Files

  3. #3
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerges (xp)

    Thanks again Hans, i will look into all this...

    i found a 'cheat'. which is make a hyperlink to the document, it works ok, as long as i save and close the form and run the query before the word document opens, so that it has the latest data from the query to merge.

    what would be really cool would be to make a form that runs from word which has all the merge fileds that i require plus a combobox field which will update other mergefields.

    Paul
    Thanks,

    pmatz

  4. #4
    Super Moderator
    Join Date
    Aug 2001
    Location
    Evergreen, CO, USA
    Posts
    6,623
    Thanks
    3
    Thanked 60 Times in 60 Posts

    Re: Mailmerges (xp)

    It frankly doesn't give much advantage to run the automation from Word, since the bulk of your work in being done in Access where you data is presumably stored. We typically do the Automation in Access because of the ease of creating forms and queries - doing that sort of stuff in Word can be a real pain.
    Wendell

  5. #5
    4 Star Lounger
    Join Date
    Aug 2003
    Location
    Stroud, United Kingdom
    Posts
    548
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Mailmerges (xp)

    Thanks alot, I am learning much now [img]/forums/images/smilies/smile.gif[/img]
    Thanks,

    pmatz

Posting Permissions

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