Results 1 to 7 of 7
  1. #1
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Mail Merge (Word xp)

    I am trying to do a merge in Word XP using an Access query as the datasource. I am used to doing this in previous versions of Word, but now I have to do it in XP for someone. ( I don't even have a copy myself so I can't experiment easily).
    My specific problem is that when I try to specify the datasource and navigate to the right database, I get a dialog box that lists about 5 of the queries and all the tables. For some reason all the other queries (which happen to include the ones I need to use) are not listed.
    The actual merge will eventually be initiated from within Access.
    I found I could programme Access to export the query results as a Excel file, then specify the Excel file as the datasource. But I shouldn't have to do this.

    Is this conected to the default conection method being OLEDB rather than DDE?
    Regards
    John



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

    Re: Mail Merge (Word xp)

    Your presumption is correct - OLE DB won't let you use a parameter query as a data source without playing lots of games. One solution is to force DDE - do a search on Mail Merge with XP and DDE as there have been several recent threads on this subject. We also did an article on Mail Merge in WAW several months ago.
    Wendell

  3. #3
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Mail Merge (Word xp)

    Thanks.

    I had done some hunting around on this, including the WAW article, but did not find this restriction on query types.
    Regards
    John



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

    Re: Mail Merge (Word xp)

    Unfortunately this part of Office is basically undocumented. I believe the restriction on queries is that it cannot be a parameter query if you are going to use it with OLE DB. If however you force it to be a DDE connection - which I still struggle with in XP - then you should have all the queries available to you. Hope this makes helps clarify the situation.
    Wendell

  5. #5
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Mail Merge (Word xp)

    I have a last got back to this, and using the code from WAW, got it all working OK.
    But another question arises for me. If you want to set up a new mail merge to be based on a parameter query, it is going to take some fiddling to get the word doc set up. It seems to me I will have to do the following:
    * Create a query that doesn't have the parameters in Access.
    * Go to Word and set up the document using the access query (I need this to have the merge fields available).
    * Save the doc, then remove the datasource info from it.
    * Now back in Access, create the parameter query, and write the code to perform the merge.

    Is there any part of this I can leave out?
    Regards
    John



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

    Re: Mail Merge (Word xp)

    Well, it doesn't have to be quite that complex. You can create the Main Merge document in Word and force the use of DDE. In order to do that you have to do Tools/Options and on the General tab set the "Confirm conversion at Open" option. That will give you the choice of what method to connect to the Access database. If you pick DDE you will get all queries. In other respects you are correct, as long as you want to initiate the merge from Access. You might want to look at Q320476 for more details on how this works.
    Wendell

  7. #7
    Super Moderator
    Join Date
    Jun 2002
    Location
    Mt Macedon, Victoria, Australia
    Posts
    3,993
    Thanks
    1
    Thanked 45 Times in 44 Posts

    Re: Mail Merge (Word xp)

    Thanks again. Exacly what I wanted.

    My previous inquiries had led me to the view that you couldn't change the connection method easily from within Word.
    Regards
    John



Posting Permissions

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