开发者

Create PDF From a Database Object and Send it Via Email

开发者 https://www.devze.com 2023-02-03 09:03 出处:网络
In VBA for Access 2007 I wish to create a PDF document and e开发者_Python百科mail that document out to someone. How would I go about creating a PDF document in VBA?You can use the SendObject method of

In VBA for Access 2007 I wish to create a PDF document and e开发者_Python百科mail that document out to someone. How would I go about creating a PDF document in VBA?


You can use the SendObject method of the DoCmd object:

http://msdn.microsoft.com/en-us/library/bb214075(v=office.12).aspx

DoCmd.SendObject acSendReport, "Employees", acFormatPDF, _
    "Nancy Davolio; Andrew Fuller", "Joan Weber", , _
    "Current Spreadsheet of Employees", , False

To save in PDF format, you must first install an add-on:

http://office.microsoft.com/en-us/help/print-share-and-protect-files-in-the-pdf-and-xps-file-formats-HA010167527.aspx

0

精彩评论

暂无评论...
验证码 换一张
取 消