Sending An access report in PDF format

S

Stan

I have created reports in access using the Adobe Acrobat
Distiller. I placed the report in temp subdirectory in
order to send the reports via email.

I would like to use the sendobject command to send the
reports via Email. I would like to use the pdf format, but
I only have the .snp format.

Is there a way to add the PDF format.

Is there a way to send the already create report using
this command
 
S

Steve Schapel

Sorry, Stan, this is not possible with a macro. As far as I know, you
have two choices...
1. Use a VBA procedure to set up Automation to Outlook, and use this to
attach the pdf files and send the emails. Example of how to approach
this can be found at http://support.microsoft.com/?kbid=209948
2. Use a third-party tool to manage this stuff. Total Access Emailer
from www.fmsinc.com is brilliant.

Some other excellent information that might be of assistance at
http://www.granite.ab.ca/access/email.htm
 
G

Guest

This is the shell cod

Public Function ShellEx(
ByVal sFile As String,
Optional ByVal eShowCmd As EShellShowConstants = essSW_SHOWDEFAULT,
Optional ByVal sParameters As String = "",
Optional ByVal sDefaultDir As String = "",
Optional sOperation As String = "open",
Optional Owner As Long = 0
) As Boolea
Dim lR As Lon
Dim lErr As Long, sErr As Lon
If (InStr(UCase$(sFile), ".EXE") <> 0) The
eShowCmd =
End I
On Error Resume Nex
If (sParameters = "") And (sDefaultDir = "") The
lR = ShellExecuteForExplore(Owner, sOperation, sFile, 0, 0, essSW_SHOWNORMAL
Els
lR = ShellExecute(Owner, sOperation, sFile, sParameters, sDefaultDir, eShowCmd
End I
If (lR < 0) Or (lR > 32) The
ShellEx = Tru
Els
' raise an appropriate error
lErr = vbObjectError + 1048 + l

Err.Raise lErr, , App.EXEName & ".GShell", sEr
ShellEx = Fals
End I

End Functio

This is the pdf print or email cod

Private Sub Form_Load(
Dim sFile As Strin
Dim Path As Strin
Dim strFile As Strin
Dim List As Strin
Dim LFile As Intege
PrintPDF1.Visible = Fals
Dir1.Path = "K:\newcatdwgs\
Path = Dir1.Pat
File1.Path = Dir1.Pat
File1.Pattern = "*.pdf
List = File1.ListCoun
If List = 0 The
En
End I
File1.ListIndex =
LFile = File1.ListInde
strFile = Path & "\" & File
Do While LFile <= List -
LFile = LFil
File1.ListIndex = LFil
strFile = Path & "\" & File
ShellEx strFile, essSW_HIDE, , , "print", Me.hWn
LFile = LFile +
If LFile > List - 1 The
En
End I
Loo

En
End Su

I use this to print about 200 .pdf to the default printer everyday however you can use the same basic code just change the "print" to email and put in your email criteria which is email provider specific. If you search their website you should be able to find sample code for that part
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top