Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Search results for query: *

  1. dougjack10

    Automatically save a word mail merge document

    I am trying to automatically save a word mail merge documents that has been generated from access. I have generated some code that; 1. Opens the mail merge documents, 2. It then merges the mail merge documents to a new document based on a record in an access database. 3. We then go back to...
  2. dougjack10

    Mail Merge from access to word

    It is the last line. With WordDoc WordObj.Visible = True .SaveAs ("C:\Users\NewDocument.docx") End With 1. I open the mailmerge.docx. 2. Then there is command to merge the document (.ActiveDocument.MailMerge.Execute)which opens a new unnamed document. This is the documents we...
  3. dougjack10

    Mail Merge from access to word

    Yes Duane definitely deserves a star. The letter will be a docx Duane suggested changing the middle line. However this is the mail merge document that closes and then the merged document remains open. So if I replace .Close savechanges:=False, with .SaveAs ("C:\Users\NewDocument.docx")...
  4. dougjack10

    Mail Merge from access to word

    Excellent, that does the job thank you very much. One last thing and final request. I am trying to automatically save the merge file, I was able to do this with excel. Something along the lines of. ActiveWorkbook.SaveAs fileName:= _ "\\Agfgsdnewfs01\letter.xls", _...
  5. dougjack10

    Mail Merge from access to word

    See below, I have attached the code. I do have a few other letters to produce and I suspect the second option may be easier to manage, but not sure how to code this. I have attached the SQL regarding the first option. Thanks SELECT TBL_Owner.OwnerID...
  6. dougjack10

    Mail Merge from access to word

    Thanks for your patience Dhookham. I seem to be making progress. This is now merging, and the letter appears although as we know the only merge field that appears is IDoptionpayments, and for the letter to work I will need to include about 20 fields. The code below changes the query...
  7. dougjack10

    Mail Merge from access to word

    I am getting the following error message Syntax error missing operator in query expression IDoptionpayments = 39 &' It then opens up the merge documents showing all records. The query has been amended, and now shows only the IDoptionpayments merge field in the word documents and all the...
  8. dougjack10

    Mail Merge from access to word

    This seems to change the query, qry_landownerpayments2. So it is now just a query showing one record being 44, as opposed to the original with 115 records I want to simply update the query or filter the query so it just selects record 44. I wanted to see if it would work with 44 Ideally it...
  9. dougjack10

    Mail Merge from access to word

    Yes it is the IDoptionpayments field that I am merging. It was always this IDoptionpayments even though I referred to it as IDPayments above. I have simply tried to amend this field so it is IDoptionpayments=44. Hopefully when it is working I will try...
  10. dougjack10

    Mail Merge from access to word

    I seem to be having some luck with the mail merge option. I seem to have sorted out the ODBC issue by creating the word merge file from access. The code now works and opens the document and merges the document. However it does not work if I refine the query and put the following in the...
  11. dougjack10

    Mail Merge from access to word

    Thanks Dhookom I have got this to work, albeit I am now extracting from the current access form and using bookmarks in word, to insert fields from access into word. Ideally I would rather use the mailmerge, but this is a good interim solution. The only problem I now have is that if I have a...
  12. dougjack10

    Mail Merge from access to word

    I might just go back to a standard Microsoft access report although this is not ideal. The select queries or variable queries do not appear to work from access. Actually I noticed they do not appear in Microsoft word if you want to merge from a query. I.e Forms]![frm_name]![Feild], or...
  13. dougjack10

    Mail Merge from access to word

    Thanks for your reply, sounds like a good suggestion. I tried setting up the mail merge from access, and I get this message pop up in word, ODBC driver login failed, it is then asking for authorisation. I played around with some of my security settings in word, but no luck. This thread deals...
  14. dougjack10

    Mail Merge from access to word

    I have a fairly simple request and I have been looking all over the internet for an answer. All I want to do is; Click on a button in access; 1. It opens a mail merge word document that has already been setup and linked to a query in the access database. 2. The document then merges to one...

Part and Inventory Search

Back
Top