Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations derfloh on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Sending Reports from Access as PDF

Status
Not open for further replies.

bblekfeld

Programmer
Mar 9, 2004
49
US
Does anyone happen to know a way to generate an email out of access with an attached report as a PDF? Begginer here. Any help would be appreciated.
 
Saving a report as PDF faq703-2533
Then search the forums for "Outlook Automation" for the rest....

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
What do I do if the report is still just printing to my printer and not to a PDF. It seems like the portion of the code that changes the default printer to PDF writer is not working.
 
Sorry, I hadn't been using the XP code. However, now that I am, I am getting an error that this function is not defined.

sSleep (5000)

Do I need to add this function somehow?

THanks so much for your help!!!
 
Yes....you are missing the sSleep function. I forgot to add that to the FAQ.



Private Declare Sub sapiSleep Lib "kernel32" _
Alias "Sleep" _
(ByVal dwMilliseconds As Long)

Sub sSleep(lngMilliSec As Long)
If lngMilliSec > 0 Then
Call sapiSleep(lngMilliSec)
End If
End Sub

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
Thanks you so much!!!

This is going to be so helpful!

Another question:
I still however cannot get Adobe to stop opening up whenever I create the file.

And also, Is there a way to programatically get Windows XP to stop asking me if it's okay to automatically send and email?
 
And also, Is there a way to programatically get Windows XP to stop asking me if it's okay to automatically send and email?
Do a google search for "outlook object model guard redemption"
Alternatively you may consider using CDO instead of Outlook.

Hope This Help, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884
 
The windowsXP asking about mailing is a bit of a drag...there are work-arounds, but I have just come to live with them or use BLAT when the process needs to be fully automated.

The code supplied in the FAQ should be suppressing the Adobe window....but look that the line that has bExecViewer in it....that is the key in question.

=======================================
People think it must be fun to be a super genius, but they don't realize how hard it is to put up with all the idiots in the world. (Calvin from Calvin And Hobbs)

Robert L. Johnson III
CCNA, CCDA, MCSA, CNA, Net+, A+
w: rljohnso@stewart.com
h: wildmage@tampabay.rr.com
 
I have downloaded redemption but I have no idea how/where to install or how to call upon those Redemption objects the generate and email with an attachment. Does anyone have an example of the code to use?

Thanks again (Very new here)
 
If I have Adobe Acrobat 6.0 Standard, does that include "Writer" or is that just Reader and Distiller? The code will not change printers. Nor will it stop a PDF from opening if I set the default printer to PDF manually.

Sorry if these questions are elementary.
 
You need PDFWriter. Re-install Adobe choosing "Custom Install" and select PDFWriter. Then you can save a report as a PDF using FAQ703-2533.
 
Hello, I've successfully followed the faq on saving the report as a pdf file, but somehow I am losing the formatting on part of the report, and i can't see any rhyme or reason as to why those specific parts of the formatting (in this case, lines) are missing.

does anyone have any idea as to why this is happening, or how i can fix it?

many many thanks,
nimarii
 
I am trying to work through this myself, using Win2k and Access 2k. I am using the "older" code, but I am having the same problem that bblekfeld is having... I am using Acrobat 6 Professional, which I have uninstalled and done a custom install as suggested. Unfortunately "PDFWriter" is not an option. I looked into the Registry and found nothing about the entry that should be changed to a 0. Perhaps this version's registry entries are different than the one the code is intended for?

I cannot get the script to accurately name my PDF (it calls it the Report name, not the name I'm specifying), nor can I get it to stop opening after it is generated.

Any help? I'm very new, but getting proficient in copying and pasting code snippets! :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top