Victor Moss
Board Regular
- Joined
- May 3, 2014
- Messages
- 90
Hi,
I have a workbook I would like to save each worksheet as separated PDFs and open each PDF in its own email, so far I can save each worksheet as its own PDF, but how do I open each PDF in its own email? I would also need I to delete any existing PDFs first, this is what I have:
Sub SaveWorksheetsAsPDFs()
Dim sFile As String
Dim sPath As String
Dim wks As Worksheet
With ActiveWorkbook
sPath = .Path & "\"
For Each wks In .Worksheets
sFile = wks.Name & ".pdf"
wks.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=sPath & sFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Next wks
End With
End Sub
I have a workbook I would like to save each worksheet as separated PDFs and open each PDF in its own email, so far I can save each worksheet as its own PDF, but how do I open each PDF in its own email? I would also need I to delete any existing PDFs first, this is what I have:
Sub SaveWorksheetsAsPDFs()
Dim sFile As String
Dim sPath As String
Dim wks As Worksheet
With ActiveWorkbook
sPath = .Path & "\"
For Each wks In .Worksheets
sFile = wks.Name & ".pdf"
wks.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=sPath & sFile, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=False, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=False
Next wks
End With
End Sub