Hi guys
I have the following code which was done by a former colleague
'
' Save Macro
Public Sub CommandButton1_Click()
ThisFile = Range("D18").Value
MyDir = Range("I1").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=MyDir & ThisFile & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
What the above does is create a pdf document and save it down to a location which works perfectly
Is it possible to build on this ?
What I would like to happen if possible is that I have an e mail address in cell A10 of the "Service Invoice" sheet
Would it be possible to attach the saved pdf and attach it to outlook and send it to the e mail address in cell A10
If also possible in the subject field of outlook once the email is aatched and ready to send is it possible to have the value in cell A5 of the "Service Invoice" Sheet and then the value in D18 which is the invoice number so the subject field reads "Palace Place, Inv No. 1003"
Any help on this would be most appreciated
I have the following code which was done by a former colleague
'
' Save Macro
Public Sub CommandButton1_Click()
ThisFile = Range("D18").Value
MyDir = Range("I1").Value
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:=MyDir & ThisFile & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
What the above does is create a pdf document and save it down to a location which works perfectly
Is it possible to build on this ?
What I would like to happen if possible is that I have an e mail address in cell A10 of the "Service Invoice" sheet
Would it be possible to attach the saved pdf and attach it to outlook and send it to the e mail address in cell A10
If also possible in the subject field of outlook once the email is aatched and ready to send is it possible to have the value in cell A5 of the "Service Invoice" Sheet and then the value in D18 which is the invoice number so the subject field reads "Palace Place, Inv No. 1003"
Any help on this would be most appreciated