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 Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How do you name the output pdf using Docmd.sendobject?

Status
Not open for further replies.

RonQA

Technical User
Jun 24, 2007
61
0
0
US
Using Access 2007 and the Docmd.Sendobject command I send out a pdf, but I cannot find a way to name the pdf being sent. I do not want to use an Outlook reference and go that route since a lot of people here have different versions of Outlook. Is there a way to name the pdf?

DoCmd.SendObject [objecttype][, objectname][, outputformat][, to][, cc][, bcc][, subject][, messagetext][, editmessage][, templatefile]

My line:
DoCmd.SendObject acSendReport, strDocName, acFormatPDF, , , , "CAPA# " & strWhere & " Has Been Initiated", "Please Review the Attached CAPA and Respond Appropriately." & vbCrLf & vbCrLf & "Thanks," & vbCrLf & vbCrLf & "Quality Assurance Department"

Thanks,
 
Why would you give a specific name to an attachment ?

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
This code is in a Corrective Action Database. The users hit a button to send the email report of the Corrective action report. The resulting attachment is named after the actual table by default. ("CAR Table.pdf")

The preference would be that it is named per the actual report number ex. "C1109-2.pdf"

Thanks
 
Perhaps you may save the report as the desired PDF and then use CDO to send it:
thread705-1369407

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top