I use the below marco to create the myPDF.pdf. I get this message when trying to open it. The error said: "Acrobat coult not open 'myPDF.pdf' because it is either not a supported file type or because the file has been damaged (for example, it was sent as an email attachment and wasn't correctly decoded). To create an Adobe PDF document, go to the source application. Then print the document to Adobe PDF". It works when I do manually from the Excel workbook. Would you point out what I did wrong here in my macro code. Thanks.
___________________________
Sub Macro5()
'
Dim PDFFileName As String
PDFFileName = "E:\myPDF.pdf"
MySheet.Range("MyRange").PrintOut copies:=1, preview:=False, ActivePrinter:="Adobe PDF", PrintToFile:=False, Collate:=True, PrToFileName:=PDFFileName
End Sub
___________________________