Hi
i have to export a pdf with this code but it’s not working after compile:
Sheets(“report”).ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
strPathLocation & strFileName & “.pdf” _
, Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
Thanks for your help
I use the following in my compiled VBA:
Application.PrintCommunication = False
Application.ActiveSheet.PageSetup.FitToPagesWide = 1
Application.ActiveSheet.PageSetup.FitToPagesTall = False
Application.PrintCommunication = True
Application.ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=myPDFFileName, _
Quality:=xlQualityStandard, _
OpenAfterPublish:=OpenAfterPub, _
includedocproperties:=False, _
IgnorePrintAreas:=False
Call MsgBox(“Save PDF Check-in Log File complete to File:” & vbCrLf & myPDFFileName, vbInformation, Title)
Exit_Sub:
Application.StatusBar = “”
Suggest you check to ensure you have something similar to the following:
Thanks a lot Steven i’m trying today
I’ve have see something strange. when i use this code after compile :
spath = ActiveWorkbook.Path
msgbox(spath)
I obtain: “J:nm4/” the hardisk J doesn’t exist on my PC
But if i code the path clearly like this:
strPathLocation = “C:\Users\Kevin\Downloads”
it’s working.
you know why?
Thanks for your help
It’s because XLS Padlock uses virtualization so the folder does not exist for real.
A solution to your problem exists. Please follow this: