ShrimpSalad
New Member
- Joined
- Mar 17, 2017
- Messages
- 6
I currently have an excel spreadsheet that I created recently, that would export the active sheet into PDF format and attached to an outlook email.
However, ever since the company updated the Adobe Acrobat to Acrobat DC, the code would prompt error.
Any assistance is greatly appreciated.
However, ever since the company updated the Adobe Acrobat to Acrobat DC, the code would prompt error.
Sub AttachActiveSheetPDF()
Dim IsCreated As Boolean
Dim i As Long
Dim PdfFile As String, Title As String
Dim OutlApp As Object
' Define PDF filename
PdfFile = ActiveWorkbook.FullName
i = InStrRev(PdfFile, ".")
If i > 1 Then PdfFile = Left(PdfFile, i - 1)
PdfFile = PdfFile & ".pdf"
' Export activesheet as PDF
With ActiveWorkbook
.ExportAsFixedFormat Type:=xlTypePDF, Filename:=PdfFile, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=False
.ActiveSheet.Select True
End With
Any assistance is greatly appreciated.