Thanks Soul!
I am also looking to add a CC to the below code.... Can anyone assist?
Sub RDB_Workbook_To_PDF_And_Create_Mail()
Dim FileName As String
'Call the function with the correct arguments
FileName = RDB_Create_PDF(ActiveWorkbook, "", True, False)
'For a fixed file name and overwrite it each time you run the macro use
'RDB_Create_PDF(ActiveWorkbook, "C:\Users\Ron\Test\YourPdfFile.pdf", True, False)
If FileName <> "" Then
RDB_Mail_PDF_Outlook FileName, "ron@debruin.nl", "Daily Production Sheet", _
"" _
& vbNewLine & vbNewLine & "Best Regards", False
Else
MsgBox "Not possible to create the PDF, possible reasons:" & vbNewLine & _
"Microsoft Add-in is not installed" & vbNewLine & _
"You Canceled the GetSaveAsFilename dialog" & vbNewLine & _
"The path to Save the file in arg 2 is not correct" & vbNewLine & _
"You didn't want to overwrite the existing PDF if it exist"
End If
End Sub
Thanks
Ross
Bookmarks