Results 1 to 13 of 13
  1. #1
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Access Merges to Word (Access 2000)

    I'm not sure if this should be a Word post or an Access Post but will start here. I have a database that needs various Word Merges. I'm used to doing merges in Word 2000 and have had no problem looking back to Access and finding the query I want to use. In the XP version of work when I look back to select the source, if I point to the database (tables are split) then I get an error message that states there are no tables. In Word 2000 you have a choice in this view of tables or queries, and when I pick queries I get the info I need no problem. In XP I don't get this option. If I select the split tables file I have the choice of the tables to merge from but no queries. Any ideas?? Also, is there a better way to merge to Word directly from Access to word (not necessarily using a customized report) vs starting in Word.

    Thanks,
    Leesha

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

    Re: Access Merges to Word (Access 2000)

    <hr>In the XP version of work when I look back to select the source, if I point to the database (tables are split) then I get an error message that states there are no tables.<hr>
    This is courtesy of the changes made to the Word mail merge function in XP. By default, it only wants to work with tables, and only use OLEDB data sources. The prompts and choices you get are dependent on the version of operating system you are using - WinME in particular causes some different behavior. There have been several recent threads on these kind of issues with merges in the Word forum. In addition we have some info on merges using Automation (running it from Access) in one of our tutorials.
    Wendell

  3. #3
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Merges to Word (Access 2000)

    >>This is courtesy of the changes made to the Word mail merge function in XP

    You are using the term "coutesy" in jest I assume. I'm going batty with the Word version of XP and wish I'd never upgraded. To compound the issue, the user who needs the merge files is using Word 2000 - I won't go into the issues I'm running into! Unless I do all the work on their computer or another computer with Word 2000 the stuff I do on mine is riddled with issues. Thus why I was looking for a better way to do it directly from Access.

    Thanks! I start searching the Word forum as well.
    Leesha

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

    Re: Access Merges to Word (Access 2000)

    Here's a <post#=248138>post 248138</post#> to look at for what will work in most cases to fix the problem of not seeing queries. You might also want to look at <post#=210761>post 210761</post#> which tells you how to get the old Mail Merge Helper back. Finally, MS has made available a white paper on the XP merge process that you can get at <!mskb=304862>Microsoft Knowledge Base Article 304862<!/mskb>.
    Wendell

  5. #5
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Merges to Word (Access 2000)

    OMB Wendell! You have NO idea how long I've struggled with this. I was just about a broken/beaten woman and it takes alot for me to give up!! I could cry with joy.
    Now one more question/observation - when I built a non-query based merge from Access to Word (XP version) and then tried to run it in a Word 2000 environment, I no longer had control over the original source with the <<ABX>> icon as it wasn't enabled. I assumed it was due to the version difference so when I saved the same form in a Word 2000 version the same thing happened. Any ideas??

    Leesha

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

    Re: Access Merges to Word (Access 2000)

    I'm confused over what you are doing - did you build a merge using the OLEDB data source in 2002, and then take that document and try to run it in 2000? If that's the case, I'm not surprised. 2000 will support ODBC and DDE, but not AFAIK the OLEDB data source. If you use DDE with 2002, it should also work with 2000 (and 97, 95 and even Word 6). DDE has some ugly sides to it, as it tends to be slow and fragile, but it works across versions better than anything else. In addition, it works well with parameter queries, though you can achieve similar results with ODBC where you build a query on the fly.
    Wendell

  7. #7
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Merges to Word (Access 2000)

    >>did you build a merge using the OLEDB data source in 2002, and then take that document and try to run it in 2000? If that's the case,

    Yep! That is what I did. I'm soooo relieved taht the DDE will run in 2000. Of couse I haven't a clue as to what DDE is but after following Han's directions in the post you referenced me to, I was hoping I would be OK with Word 2000 docs. I was having such a struggle with this I figured it had to be me.

    Thanks again. You've made my day!

    Leesha

  8. #8
    3 Star Lounger
    Join Date
    Jan 2001
    Location
    Wetherby, Yorkshire, England
    Posts
    283
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Merges to Word (Access 2000)

    Leesha
    Also try Helen Feddama's site. She has some great help items on loads of things including automating Word docs from Access.
    Peter

  9. #9
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Merges to Word (Access 2000)

    Thanks!! I'll check it out tonight.

    Leesha

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

    Re: Access Merges to Word (Access 2000)

    In addition you might check out the WAW (Woody's Access Watch) site - we authored an article on Mail Merges that you can find there - it predates the tutorial on our website. You might also want to subscribe to WAW if you are going to be doing ongoing database development.
    Wendell

  11. #11
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Merges to Word (Access 2000)

    Thanks! Will do!

    Leesha

  12. #12
    3 Star Lounger
    Join Date
    Jun 2002
    Location
    Nottingham, Nottinghamshire, United Kingdom
    Posts
    257
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Access Merges to Word (Access 2000)

    If you are trying to instigate a merge from Access into Word, i.e. clicking a button on an Access form, then you can automate the process. You have to populate a table with the info you want to merge (I use a table called tblMerge that I clear and refill each time to save having to recreate) and then you use automation to open Word create a new document and perform the merge. The code I used was developed partly using code from WAW and with considerable help from HansV in making it automatic. Perhaps someone could find the link.

    strLetter = gstrTemplatePath & "MResMergeLetter.dot" 'a letter template
    Set appWord = GetObject(, "Word.Application")
    Set docs = appWord.Documents
    docs.Add strLetter
    Set doc = appWord.ActiveDocument
    Set prps = appWord.ActiveDocument.CustomDocumentProperties
    prps.Item("Writer").Value = Me!Writer
    prps.Item("WriterTitle").Value = Me!WriterTitle
    prps.Item("WriterRef").Value = Me!WriterRef
    appWord.Selection.WholeStory
    appWord.Selection.Fields.Update
    With doc.MailMerge
    .MainDocumentType = wdFormLetters
    .OpenDataSource _
    Name:="", _
    LinkToSource:=True, _
    Connection:="DSN=MS Access Database;DBQ=" & gstrMergeFile, _
    SQLStatement:="SELECT * FROM tblMerge"
    'gstrMergeFile holds the name of the database in which tblMerge is located. Its a local database for each user. It can't be in the main backend or it could be overwritten by others performing their own merges
    End With
    appWord.Visible = True
    appWord.Activate

    You also need to trap the error that occurs if Word is not already open:

    If Err = 429 Then
    Set appWord = CreateObject("Word.Application")
    Resume Next

    Hope this suggestion helps

  13. #13
    Silver Lounger
    Join Date
    Jan 2002
    Posts
    1,615
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: Access Merges to Word (Access 2000)

    Hi Dolly,

    Thanks for the info. I'll give it a shot.

    Leesha

Posting Permissions

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