How To Export A Microsoft Access Report As A PDF
- 13
- Add a Comment
Microsoft Access is one of the most awesome prototyping tools anyone in software development could ever use, however, there are also some really serious downsides. I know the software purists will be rolling over in their graves with my comments, but after 20 plus years of commercial software development for some of the world’s largest companies, I stand by my comments.
Microsoft Access makes it very easy and very cost effective to develop a database application and then roll it out onto the desktop. One of the downsides to this application is that it has always been incredibly difficult to export reports from Microsoft Access to another format. Most Microsoft Access developers that I know who build these systems use third party applications to export reports like Crystal Reports or Microsoft Word. The downside to using Microsoft Word is that you cannot export OLE objects; using the merge process, you actually have to use VBA code in Microsoft Word to call the OLE object via ADO. Well, that is one technique, anyway. Now, with Adobe Acrobat Writer Version 7, we have a new, more effective method.
The exporting of OLE objects has always been a major downside to Microsoft Access and Microsoft Word, but I was recently working with Adobe Acrobat Writer Version 7 and I found that this version of the software now installs itself in all major Microsoft Office applications. This is a fantastic step forward for Microsoft Access developers as this means you can develop a report exclusively in Microsoft Access and then print the report straight to a PDF format rather than first going to a Microsoft Word document then converting it into an Adobe Acrobat PDF file. The other key advantage is that if you are using an OLE object data type in a report, the Adobe PDF file will accept that data type and show a picture if that is what you are looking for. A lot of my clients have wanted to use Microsoft Access to develop reports that include photos and distribute them using Microsoft Word, but up until now it’s not been an easy task (without using extensive VBA code). Adobe Acrobat 7 allows us to create a PDF file from a report with OLE objects and include them as photos etc within the PDF File. This means organizations that want to distribute staff files or product descriptions can create them using Microsoft Access. First of all they create the descriptions as a report and then convert them to PDF format using Adobe Acrobat Writer.
Adobe has provided two ways to generate your PDF report. First off, it installs an Adobe dropdown menu into the Microsoft Access main menu bar and from this dropdown menu you can then choose to create the report as an Adobe PDF. Note: You must open the report first. You can even use this menu function to create the report and then email it directly to a third party. I think this feature alone is worth the AU$700 you pay for Adobe Acrobat Writer.
The second method is to open your report and then choose the File menu and then Print. The Print dialog box will open and then you choose Adobe Acrobat writer as the printer and then choose the OK button, which will then start Adobe Acrobat and generate your PDF.
With this new method to build a PDF file, you can even use Visual Basic for Access to automate the print process and then email the file using MAPI or CDO. If you are one of those people who like to use macros over using VBA there is no way that I can find where you can achieve this. If you could find someone who could create a module for you that automates this process you could use a macro then by calling the function in the module from the macro window. All this of course is dependent on finding the right person to write that function. I have not done this directly, because I have been using a form with VBA code to automate the creation of the PDF and then email it via CDO.
One of the questions I get asked a lot, especially by people from global organizations that need to write monthly reports, is “Would it be possible to automate this process and have the reports email themselves once a month?” The answer to this is ABSOLUTELY YES! The catch though is you would need to leave Microsoft Access open on a machine and then have a developer to write some code that acts like a timer and then, once the computer clock ticks over the form, could simply create the associated reports and email them via MAPI. This seems complex all in all, but for a competent VBA programmer, there should not be any problems doing this.
When Microsoft Office 2007 is released in 2007 (one can hope), Microsoft has said that it will be including the functionality for producing PDF files from within Microsoft Office 2007. We hope this functionality will be included for Microsoft Access 2007, which means, in the next version, macro developers may be able to export directly to PDF format and then email directly to clients. If Microsoft does offer this in its new version, this to me would be the major reason I would recommend all companies upgrade to this new version. I wait in hopes that this will be the case.
Chris Le Roy is a veteran of the software development - having worked in the field for over 20 years - and has been developing systems using Visual Basic 6, VB.Net, Microsoft Access and SQL Server, ASP, VB Script, and Java Script. He currently runs a specialist Computer Training Centre in Townsville, Australia, where people from all over the world train to learn advanced techniques in programming in these applications. Many of his clients specifically focus on Microsoft Access development training. Chris has written a number of training programs (including several for learning Microsoft Access) and they are available from his Web site.
[Article Source: EzineArticles.com]
[tags]access,report,pdf,ole,ado,adobe acrobat writer version 7[/tags]

13 Comments
Carlos
March 4th, 2007
at 6:17am
Is there a way to import my outlook address book into outlook exchange server mail. At my work we migrated to outlook exchange via the web but I cannot find a way to import my address book. (other than sending myself an e-mail containing the address and manually adding the entry. This seems archaic to me.
Carlos
Elizabeth Maloney
April 6th, 2007
at 7:40am
Thanks for the article!…We run reports from an Access database and we would like the report to be automatically formatted to PDF format. You indicated in your article that there may be a way to do this with VBA coding? Can you help out with some additional details?
kamal gupta
May 21st, 2007
at 7:44am
i want to write a program in vb6 to connect my phone to my pc using bluetooth, then i want to send message to so many number and i feed there mobile in a txt file . Is it Possible if yes help me .
give me some code
thanks
KHASSOUM LY
June 21st, 2007
at 11:25am
Hi
1- How export access 2007 report into Excel.
2- How Export access 2007 report to PDF File.
Please i need your hepl.
Thanks
Khassoum
fermin ornelas
July 3rd, 2007
at 10:52am
I have acrobat 6 installed and does not show the icon in access but it shows it in excel and word. I suspect I need to upgrade to version 7 or higher (8) correct?
Thanks,
F Orneals, Ph.D.
Mark
August 21st, 2007
at 12:22pm
This is really cool, I found out how to go in Adobe Designer and then under “Object”, then “binding” to “data connection” into the MSAccess DB and read out one record onto a PDF file, but I actually want to put information FROM PDF into Access, I am having problems finding a good explanation of how the ADO Properties menu works [cursor type (forward, keyset, dynamic, static); Cursor Locatoin; lock type &c.]. Does anyone know if it is possible to read from PDF into Access? I think I am close but I am still a bit of a newb.
Any & All help is appreciated.
robway
October 23rd, 2007
at 12:00am
I’m getting my reports out into PDF with no bother - now - but the photographs are very poor. I took them as RAW, and have tried several different resolitions in JPEG for the reports, but in PDF they’re always terrible. Any thoughts?
Steve
February 4th, 2008
at 2:38pm
I am having trouble creating PDF’s that are four color on one side and only black ink on the back side. My client is using both Access and Visual Basic and then using 7.0 to make the PDF. Every file so far that we have created, changing various settings, keep coming out four color on both sides. This is a problem in that the Machine we then print it off of charges us more for color clicks than it does for black only clicks, and we have a lot to output.
Are we missing some setting either in Access or when making the PDF that would allow this?
Thanks for any suggestions.
mark c
February 12th, 2008
at 4:47pm
Instead of using Adobe acrobat, you can use Win2PDF to create PDFs from reports. The vba code to automate the report and attach it to e-mail is not too complicated. I have not tested Win2pdf reports with pictures for quality of images, so can not comment on that for that use.
David
March 13th, 2008
at 1:38am
Hi, there,
I have an application done in VB6 and reports designed using datareport!
Now my client wants to email Invoices from the application as PDF files and wants it automated. Already installed is PDF Printer but the downside is it prompts the user for the name of the invoice to be converted to PDF, which is too manual assuming you have got more than 50 invoices you want converted and emailed! How do you automate this in VB6, such that the user just clicks a button and all the conversions are done silently without user intervention?
Please help?
Katrina
May 15th, 2008
at 8:54am
Thank you thank you thank you. Why couldn’t they just include this feature with the upgrade (you have to download the add-in)?? I would never have known without you !
leopold
May 16th, 2008
at 6:50pm
looking for david answer
Eliza
August 5th, 2008
at 4:56pm
Thanks you so much. I always forget you can ‘print’ as a PDF. Saved me a bunch of hassles and hours searching for the answer. I built the whole database on the assumption (there are so many millions of things to think of when you’re building…) that I could pdf and email my invoices.
Thanks also for taking the time and effort to explain the more basic solutions to those of us who aren’t IT experts.