473,405 Members | 2,294 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

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 24686
look at the docmd.OutputTo command. More specifically, the OutputFormat parameter of the command. That will let you save the report in:
acFormatASP
acFormatDAP
acFormatHTML
acFormatIIS
acFormatRTF
acFormatSNP
acFormatTXT
acFormatXLS
acFormatXLSX
acFormatXLSB
acFormatXPS

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
zmbd
5,501 Expert Mod 4TB
WesleyN

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.


-z
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
zmbd
5,501 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
zmbd
5,501 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
http://www.databaseadvisors.com/news...omationpt2.asp
-z

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

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

Similar topics

2
by: Vikrant | last post by:
Hey Friends I need to export an Access Report using a filter. I am using the method OutputTo m_pDoCmd->OutputTo( 3, // asOutputReport COleVariant(strReportName), // <report name>...
8
by: Mike MacSween | last post by:
tblCourses one to many to tblEvents. A course may have an intro workshop (a type of event), a mid course workshop, a final exam. Or any combination. Or something different in the future. At...
1
by: Diman | last post by:
I'm after a way to copy Access Report into a Word document and still be able to edit it. Imagine a complete report (not design mode). Layout, textdata, any pictures must all be copied into...
5
by: mik18 | last post by:
I'm having trouble with exporting reports to Word in the rtf format and I'm hoping someone has a solution. The reports are losing their formats. Not all the formating is lost but some is and of...
5
by: feck | last post by:
Hi, Is there any code/routine to export a report as a word document retaining the formatting. I have a requirment to produce some fairly detailed statisitical reports for transmission by e-mail....
0
by: Peter Walburn | last post by:
Hi, I have developed a web-based application in VB .Net and have a need to export a report to Microsoft Word. I can create the report in Crystal Reports and use it's functions to export to...
2
by: rmfoley | last post by:
All, I would like to create a professional looking cover sheet with information loaded from an MS Access Report. I created the cover sheet in MS Word that includes my company logo, etc. My...
8
by: ljungers | last post by:
Wondering if somone knows how to open a Access report in Word or export it to Word. Currently I'm opening and printing a report using VBA with the following command (DoCmd.OpenReport "TheReportName",...
5
by: SIBASIS | last post by:
Good Morning, While converting MS Access Report to MS Word, gridlines are lost. Can any one help please? The data in MS Word should be presented with gridlines (As in a table) as in MS Access...
3
by: Bhujanga | last post by:
I need to create word documents from an Access Report. Below is the code that I am using. It works but there are problems. The page breaks generated by the report don't always line up just right with...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.