Results 1 to 9 of 9
  1. #1
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    email merge (a2003)

    I'm playing around with the sample automated email merge database and accompanying Word doc that John Hutchison posted in Post 362921. The cmdMerge successfully opens Word and then presents me with the below. I don't have the option to select the query with the data to merge. Any off the cuff educated quesses about why queries aren't available as record sources?

    I've run into this before using Office XP when initiated email merge from within Word and using an Access db. The selections for the data source don't contain the databases queries or displays only a small portion of the queries. So, doesn't appear to be a version specific problem.

    Eli
    Attached Images Attached Images

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

    Re: email merge (a2003)

    The post number you mention is not by John Hutchison. Did you mean <post#=362957>post 362957</post#> (the next post in the same thread)? If so, there is a remark in modMailMerge that is important; it applies to Word 2002, and I assume to Word 2003 too. The lines
    <pre> .ActiveDocument.MailMerge.OpenDataSource Name:=strDBName, _
    LinkToSource:=True, Connection:=strquery
    </pre>

    must be changed to
    <pre> .ActiveDocument.MailMerge.OpenDataSource Name:=strDBName, _
    LinkToSource:=True, Connection:=strquery, _
    SubType:=wdMergeSubTypeWord2000
    </pre>

    to force the mail merge to use DDE instead of the default OLE DB method of connecting to Access.

    Also see <post#=373769>post 373769</post#> for a way to force Word to display queries in the dialog.

  3. #3
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email merge (a2003)

    In working thru the directions for forcing Word to display queries in the dialog, I'm able to get there but only if I initiate the merge from Word and go through Word's merge wizard. Using the John Hutchison's cmdMerge I don't get any options allowing me to include queries. It just brings up Select Table.

    Is there another way to get around the problem? Is anyone else having this problem?

    E

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

    Re: email merge (a2003)

    Apparently, the way mailmerge works in Word 2003 has changed yet again from Word 2002 (which was significantly different from Word 2000 and before). In Office 2002, the code
    <pre> .ActiveDocument.MailMerge.OpenDataSource Name:=strDBName, _
    LinkToSource:=True, Connection:=strquery, _
    SubType:=wdMergeSubTypeWord2000
    </pre>

    (the addition of the third line is essential) makes the merge work automatically, if painfully slow, without popping up a Select Table dialog. Perhaps John Hutchison himself, or somebodey else with Office 2003 can help.

  5. #5
    3 Star Lounger
    Join Date
    Jul 2002
    Location
    Cedar Falls, Iowa, USA
    Posts
    268
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: email merge (a2003)

    The end user is using Office 2000. So, I'll just cross my fingers and have them test it on their set up. Thanks for the assist.

    e

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

    Re: email merge (a2003)

    In that case, you should NOT use the bit with SubType:=wdMergeSubTypeWord2000, it will cause an error on Word 2000 or before. Good luck!

  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: email merge (a2003)

    I am able to use merge code for Office XP (which i don't have) in Office 2003 without problems, but as Hans says you need to remove the last bit for 2000.

    But I tried to initiate a merge from within Word the other day , and found that at the Select data source step, there is a new Dialog box where you can choose the method, as shown below.
    Attached Images Attached Images
    Regards
    John



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

    Re: email merge (a2003)

    The dialog you mention is only displayed if you have ticked "Confirm Conversion at Open" in the General tab of Tools | Options... in Word. I find it very useful to have this option - its advantages outweigh the minor annoyance of having to confirm the method for opening text files etc.

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

    Re: email merge (a2003)

    I don't have this ticked (in tools..options), so bringing it up automatically for a merge may be new.
    edited by John

    OOps sorry this is wrong. Something peculiar happened in my initial testing of this.

    When I do it again, it only pops up the dialog box only when I have "confirm conversions" ticked in tools...Options.
    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
  •