Solved

Creating Acrobat reports via MS Access and VBA

Posted on 2007-04-01
6
244 Views
Last Modified: 2008-02-01
I have an Access database, that allows me to be able to run reports, export them to XLS, CSV, Snapshot etc and then email the required files as attachments - this works perfectly for most clients.  However, one of my clients has Apple Macs and require the graphical (Snapshot) file.  Unfortunately, I do not believe that Snapshot is supported under Macs (but if I am wrong please let me know - it would make my life far easier).  The solution I developed ment creating a Word document, running a mail merge and sending them this file - but this is cumberson.

Acrobat seems like the right solution, but only a couple of my clients have it and it needs to be integrated into Access - so I can create the PDF and then add it as an attachment.  Since not all of my clients have the Acorbat writer, I would need to use late binding and a check to see if the PC has the Acrobat writer installed before running the report.  I believe there is a SDK - but have not experience in writing the VBA code for such a process.

Any help would be really appreciated.
0
Comment
Question by:Andy Brown
6 Comments
 
LVL 1

Accepted Solution

by:
martinveen earned 200 total points
ID: 18831673
Look at:  www.lebans.com

Stephen Lebans has a function that exports report to Snapshot and then to PDF. Output exact duplicate of a Report to PDF.

Your code would look like this:
   blRet = ConvertReportToPDF(<RptName>, vbNullString, <RptName> & ".pdf", False, True, 0, "", "", 0, 0)
0
 
LVL 38

Assisted Solution

by:puppydogbuddy
puppydogbuddy earned 200 total points
ID: 18831871
Hi Andrew,
I agree with Martinveen, Lebans is the way to go.  One correction: you do not need to export to Snapshot first.  Like Martinveen, I used to think you did, but Jeff Willey convinced me otherwise.  See the link below for details on Jeff's implementation of the Lebans method.

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_21944675.html
0
 
LVL 34

Assisted Solution

by:jefftwilley
jefftwilley earned 100 total points
ID: 18832330
see this for information about checking if Adobe is installed

http://www.experts-exchange.com/Microsoft/Development/MS_Access/Q_21290913.html
J
0
Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

 

Author Comment

by:Andy Brown
ID: 18832501
Thanks everyone - that's perfect - I'll have a play.
0
 
LVL 38

Expert Comment

by:puppydogbuddy
ID: 18832541
Andrew,
Thanks for the points and grade.  Just for the record, I found this link to Tony Toew's web site, which also supports the Lebans method and  has additional info.
                   http://www.granite.ab.ca/access/pdffiles.htm

<o/t>
Hello Jeff,
Good to see you back in action! :-)
0
 
LVL 34

Expert Comment

by:jefftwilley
ID: 18832545
Hey PDB,
Thanks for caring :o)
My vacation is over I guess! lol
See you round@EE
J
0

Featured Post

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

When you are entering numbers in a speadsheet, and don't remember what 6×7 is, you just type “=6*7" instead. It works in every cell! This is not so in Access. To enter the elusive 42 in a text box, you have to find a calculator, and then copy the re…
In the article entitled Working with Objects – Part 1 (http://www.experts-exchange.com/Microsoft/Development/MS_Access/A_4942-Working-with-Objects-Part-1.html), you learned the basics of working with objects, properties, methods, and events. In Work…
Familiarize people with the process of utilizing SQL Server stored procedures from within Microsoft Access. Microsoft Access is a very powerful client/server development tool. One of the SQL Server objects that you can interact with from within Micr…
In Microsoft Access, when working with VBA, learn some techniques for writing readable and easily maintained code.

911 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

22 Experts available now in Live!

Get 1:1 Help Now