469,150 Members | 1,971 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,150 developers. It's quick & easy.

Access Report exporting and merging to Word/PDF

I try to Export and Merging Access Reports, some in table-format = with lines, and some with graphics. But I only can generate text documents.

What do I have to do to export these reports to Word in the right format?
And if I merged the generated document. Is it possible to save this document in the right format as a PDF-document?

I found some code like this: wordApp.ActiveDocument.SaveAs strOutputFileName, wdFormatPDF, ...

Thank you Wesley
Jul 2 '12 #1
6 24485
look at the docmd.OutputTo command. More specifically, the OutputFormat parameter of the command. That will let you save the report in:

But I know PDF is available. I have an app using:

Expand|Select|Wrap|Line Numbers
  1. DoCmd.OutputTo acOutputReport, pReport, acFormatPDF, TempVars!reportfilename, pPreview
Jul 13 '12 #2
5,400 Expert Mod 4TB

Which version of Access are you using?

MarkP2012 will certainly work... if you're using MS office 2010... we skipped 2007 due to a lot of user complaints about the ribbon and missing features like exporting to Excel; thus, I don't know if the pdf format is available directly from MSAccess 2007 - but I do remember reading that you had to download an add-in or it was available after one of the service packs so I am fairly certain that is not a basic option in 2007 (*).

In both 2007 and 2010 there have been some major gripes about the inability to take the reports designed in Access directly to either Word or Excel while maintaining the formating... IMHO, frankly a major mistake on MS. In 2010 there is an option to take the report to a PDF document and, for me, it has held the formatting nicely. There are however automation commands and other workarounds for getting a report to a word document.

(*) There are also free or shareware type pdf printer drivers that you can install on the PC that will handle this too.

Jul 14 '12 #3
I've solved this with two external components. I'm using now PDFSharp (open source) and PDFFocus (shareware) via a small .NET tool.

MS Access doesn't work good enough with Excel and Word.

You can adding references with Word and Excel. But you have to make templates for the borders. And I had too few time for doing that.

I know the function OutputTo. But you can only export text to Word and Excel. And for PDF, you can only export single Reports. A snapshot (SNPFormat) makes a picture of your report.
Jul 17 '12 #4
5,400 Expert Mod 4TB
Sounds like you were/are using 2007.
Jul 17 '12 #5
That's correct. But I can't change this solution.
Jul 19 '12 #6
5,400 Expert Mod 4TB
I know that you have a solution with the pdf printer; however, I've found some information about automating word from within Access... Honestly, I haven't done this as we went directly to 2010 which allows direct pdf creation of the reports; however, although written for 2000, the following might be useful: http://www.databaseadvisors.com/news...mationlpt1.asp

[edit] here's one using an exsiting document: http://www.applecore99.com/gen/gen033.asp
Jul 19 '12 #7

Post your reply

Sign in to post your reply or Sign up for a free account.

Similar topics

5 posts views Thread by mik18 | last post: by
reply views Thread by Peter Walburn | last post: by
1 post views Thread by CARIGAR | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.