SendMail

F

Fred

Hi,
how can I create an email with an attachment using the SendMail dialog.
When I record a macro and "Send: Email as PDF Attachment" I get

Sub Macro1()
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\DOCUME~1\ME~1.COM\LOCALS~1\Temp\REOI11.pdf",
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, IgnorePrintAreas:=False,
OpenAfterPublish:=False
Application.Dialogs(xlDialogSendMail).Show
End Sub

Running this macro does not work as it attaches the full Excel workbook to
the email. The ExportAsFixedFormat does work as it does create a the PDF
file, but this PDF file does not get attached to the email.
How can I get the file "C:\DOCUME~1\ME~1.COM\LOCALS~1\Temp\REOI11.pdf" to be
the attachment on the email.

Thanks for any help
Fred
 

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