Excel 2010 in a corporate environment.
Windows XP SP3
Issue: Open an excel spreadsheet that has 6 columns of information to be entered. (1 row to say, 50 rows).
I've created a macro button to "Send it" which when I recorded the macro, I went through the entire process up to and including sending the email. When I'm done, I see where it exported the file as a PDF, saving it to my C: Drive, however when I hit the button, it sets the email up with the attachment as an excel spreadsheet.
I'm sure this is something simple, but when I look through the code, I'm not seeing where it's pulling the file and attaching it to the email.
Any ideas? Here's the block of code: (I've modified out the sensitive info)
Sub SendPDF()
'
' SendPDF Macro
' Sends email with PDF Attachment
'
'
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\DOCUME~1\<userID>\LOCALS~1\Temp\<Filename>.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Application.Dialogs(xlDialogSendMail).Show _
arg1:="<recipient>", _
arg2:="<Subject>"
End Sub
Any help is appreciated.
Thanks!
-IQ
Windows XP SP3
Issue: Open an excel spreadsheet that has 6 columns of information to be entered. (1 row to say, 50 rows).
I've created a macro button to "Send it" which when I recorded the macro, I went through the entire process up to and including sending the email. When I'm done, I see where it exported the file as a PDF, saving it to my C: Drive, however when I hit the button, it sets the email up with the attachment as an excel spreadsheet.
I'm sure this is something simple, but when I look through the code, I'm not seeing where it's pulling the file and attaching it to the email.
Any ideas? Here's the block of code: (I've modified out the sensitive info)
Sub SendPDF()
'
' SendPDF Macro
' Sends email with PDF Attachment
'
'
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\DOCUME~1\<userID>\LOCALS~1\Temp\<Filename>.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Application.Dialogs(xlDialogSendMail).Show _
arg1:="<recipient>", _
arg2:="<Subject>"
End Sub
Any help is appreciated.
Thanks!
-IQ