TkdKidSnake
Active Member
- Joined
- Nov 27, 2012
- Messages
- 255
- Office Version
- 365
- Platform
- Windows
Hi all,
I am trying to set several PDF files to send automatically and so far I have only managed to create the sheet as a PDF successfully and am completely bamboozled on how to open a new email window attached the file ect ect - see below:
The code I have is as below and this creates the PDF and saves it in the Test Folder
o What I want to do now is open a new email window attached the created file to the email
The filename is on the same sheet in cell AE4 accept would have .PDF at the end.
o Subject of the email also needs to be the filename
o I also want to add the recipients in both the To and CC boxes
I have created an “Emails” sheet in the same workbook
For supplier 1 the TO email is in cell C3
The CC email address is in cell C49
o The body off the email also needs to be as below:
-----------------------------------------------------------------------------------------------------------------------------------
Dear Supplier
Attached is your latest Scorecard which has now been updated to include all the relevant data for previous month.
please review and contact myself or any member of the management team here at HydraForce if you want to discuss further.
Thank you for your continued support.
-----------------------------------------------------------------------------------------------------------------------------------
o I would like the email to display on the screen and not to send automatically
However if the you could add the code to send automatically but block it out then once I am comfortable that it is doing exactly what I want then I will change it
Any help you can provide me with on this would be greatly appreciated.
Many thanks.
I am trying to set several PDF files to send automatically and so far I have only managed to create the sheet as a PDF successfully and am completely bamboozled on how to open a new email window attached the file ect ect - see below:
The code I have is as below and this creates the PDF and saves it in the Test Folder
Code:
Sheets("Supplier1").Select
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\ss7\Desktop\TestFolder\" & Range("AE4").Value, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
o What I want to do now is open a new email window attached the created file to the email
The filename is on the same sheet in cell AE4 accept would have .PDF at the end.
o Subject of the email also needs to be the filename
o I also want to add the recipients in both the To and CC boxes
I have created an “Emails” sheet in the same workbook
For supplier 1 the TO email is in cell C3
The CC email address is in cell C49
o The body off the email also needs to be as below:
-----------------------------------------------------------------------------------------------------------------------------------
Dear Supplier
Attached is your latest Scorecard which has now been updated to include all the relevant data for previous month.
please review and contact myself or any member of the management team here at HydraForce if you want to discuss further.
Thank you for your continued support.
-----------------------------------------------------------------------------------------------------------------------------------
o I would like the email to display on the screen and not to send automatically
However if the you could add the code to send automatically but block it out then once I am comfortable that it is doing exactly what I want then I will change it
Any help you can provide me with on this would be greatly appreciated.
Many thanks.