Mail merge to word problems

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • mjvm
    New Member
    • Oct 2008
    • 52

    Mail merge to word problems

    HI again,

    I am trying to use the mail merge to word wizard under External Data from a query and this is what happens:

    On opening Word, I get an error message called: ODBC Microsoft Access Driver Login Failed, and the message says: Could not find file (and file name).

    If I click OK, I go through a series of steps to link to the database and choose the query BUT the Access tab at the bottom of the screen starts flashing and when I click back to Access it says "Word was unable to open source".

    If I click 'cancel', I get asked if I want to open a read only copy, or save it locally and update later (there is a third choice); I choose read only, and then it opens a window asking me to choose the Header Record Delimiters - for both the fields and the records. I have scrolled through and tried the options and nothing looks right. In Word, the database seems to be linked but there are no merge fields available because Word can't read them (I assume). Does anyone know what I should choose for the delimiters? (I'm not sure that this is the answer to my problem).

    If I start in Word and try to link to Access, this also doesn't work.

    I'm in Office 2007 on Windows XP; I have also tried this on the work computer by Remote and have the same problem. Work is on a later version of windows (Vista I think).

    There is only one record in the query as it is picking up the details of the open record on a form. Ultimately, I would like to have a button on this form that, with one click, will merge the details from a single record to the Word document and print it. I have looked at Albert Kallal's 'super easy word merge' but am not sure how to apply it in Access 2007. He has pasted the link on another thread here - but I can put it in if need be.

    Does anyone have any suggestions on how I might achieve this?

    The Form is called: frmMainDataEntr y; the query is called qryReferralForm . The Word document is called MergeForm.docx.

    I hope this makes sense. I have been going around in circles.

    Thanks for looking.
  • NeoPa
    Recognized Expert Moderator MVP
    • Oct 2006
    • 32656

    #2
    I know very little about MailMerge and Word, but if you are linking to Access you don't give any details about how you are trying to do it. I'm actually not even sure from there what details I'd expect to see, but certainly something. Probably including some SQL.

    I also got the impression you were trying to link to a form, or the contents displayed on a form. This makes absolutely no sense at all of course, as forms contain no data, regardless of how many people seem to be under the impression that they do. They display records from an underlying recordsource. They can display one or many, but they are merely a window through which data is seen. They cannot be used as a data source.

    Maybe it's qryReferralForm you're actually getting the data from, which would make sense, and maybe frmMainDataEntr y uses the same source, but the data cannot come from the form itself.

    Comment

    • mjvm
      New Member
      • Oct 2008
      • 52

      #3
      Hello,

      In answer to the first part - I am using the Wizard available under External data to take me through the process and it it isn't working. I am getting an error message - which I hoped someone might understand and be able to help me with and therefore, fix my problem. After having a look at some of the other responses on this forum, I now realise that the forum focus is VBA and so this may not be the right place to post my question about Wizard error messages, (?). The Driver issue - from what I can gather on my Google searches - seems to be 'office/windows' related and not specifically related to my current Access database problem. I have also referred it onto our IT person.

      I went back into the database to have another go in the hope that I might be able to post some SQL, but then it worked! And then it didn't again. And to be perfectly honest, I don't know where to look to get the SQL if it is there.

      So at this point I am completely out of my depth.

      And yes you are right (psychic): In setting thisup, I built qryReferralForm and set the criteria to select the student record open in frmMainDataEntr y - so there is a single record in the query.

      Then I want to put a Command Button on frmMainDataEntr y that will print the merged word document for that student record in qryReferralForm . I imagine the code for the button requires the following steps (very simply): open word, open document, merge data from qryReferralForm , send to Print.

      I gather that it is possible, but I don't know how to do it. Any examples of code on the net I have found have not been for Access 2007. My ability to take some code and modify it to my database is so limited - and I imagine the code required might be beyond my skills.

      I don't know the answer to that one yet.

      Cheers! :)

      Comment

      Working...