0
votes

I have programmed an Access Database program using Access 2007. I have a button that points to the event: DoCmd.SendObject acSendReport to have it email a PDF report (acFormatPDF). Everything works fine in the normal Access 2007 program, but when a user opens the program with Access 2007 Runtime, when clicking on this button it goes through the normal steps (notifying Outlook, waiting for Allow/Deny clearance), and then after you click Allow, the program crashes with a Runtime Error.

Does anybody know what is going on here? Is this a normal error with Access Runtime? I have tried other file formats (RTF and XLS) instead of PDF, but it seems to be the SendObject command that is crashing the Runtime Environment?

Clarification: Access Runtime does not output an error code upon this crash. Just a window stating a "runtime error has occurred".

2
If you wrap your call to SendObject in an error handler, you can display the error number and error description yourself.David-W-Fenton

2 Answers

0
votes

It seems that the runtime license doesn't not cover the PDF converter. However, this article:

http://blogs.msdn.com/access/archive/2007/08/23/pdf-xps-now-supported-in-access-runtime.aspx

purportedly explains how to chain the PDF converter installer with your runtime installer so that it will be part of the runtime installation. Unfortunately, subsequent discussion on that page shows that PDF output didn't actually work with the runtime. The SP2 for the runtine purportedly also fixes the problem:

http://blogs.msdn.com/access/archive/2009/04/29/access-2007-and-runtime-sp2-now-available.aspx

but some commenters there report nonspecific PDF issues. So you might want to check if you've got SP2 of the runtime and see if you can then use the PDF converter.

Sorry not to be of more help here, but it really does look like you're encountering a widely-experienced problem.

0
votes

I have discovered another issue that I had in the code. On top of the PDF issue answered by Mr. Fenton, I had an issue with the multiple email addresses in the code. I had listed multiple email addresses in the CC portion of the code. If I just list 1 email address, it works.

So now I just have to figure out how to send the email to multiple address and all should be well.