VBA Code to convert outlook mail to PDF

Mahesh Babu

New member
Joined
Nov 9, 2012
Messages
7
Reaction score
0
Points
0
Location
Hyderabad, Andhra Pradesh, India
Hi Experts,

I have a VBA script convert an email to PDF. But am getting the below Debug error.

Please help me out in resolving the error.

'Save as pdf
wrdApp.ActiveDocument.ExportAsFixedFormat OutputFileName:= _
strCurrentFile, ExportFormat:= _
wdExportFormatPDF, OpenAfterExport:=False, OptimizeFor:= _
wdExportOptimizeForPrint, Range:=wdExportAllDocument, From:=0, To:=0, _
Item:=wdExportDocumentContent, IncludeDocProps:=True, KeepIRM:=True, _
CreateBookmarks:=wdExportCreateNoBookmarks, DocStructureTags:=True, _
BitmapMissingFonts:=True, UseISO19005_1:=False


Attached is the The Code
 

Attachments

  • P D F.txt
    4 KB · Views: 378
What version of Outlook are you using?

Try shortening it to:
Code:
wrdApp.ActiveDocument.ExportAsFixedFormat OutputFileName:=strCurrentFile, ExportFormat:=wdExportFormatPDF, OpenAfterExport:=False
 
Back
Top