I am converting a PDF printing VBA code to work with 2000 - 2010
I have the code and this works on 2010
however the xltypePDF does not compile on older versions of excel.
Is there anyway to make it ignore this as the if statement means it is skipped anyway.
I have the code and this works on 2010
Code:
If Application.Version < 13.9 Then
Sheets("Invoice edit").PrintOut Copies:=1, ActivePrinter:= _
"CutePDF Writer on CPW2:", Collate:=True
waittime = TimeSerial(Newhour, newMinute, newSecond)
Application.Wait waittime
SendKeys filepath & "{ENTER}", False
Else
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:= _
filepath, Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=False
End If
however the xltypePDF does not compile on older versions of excel.
Is there anyway to make it ignore this as the if statement means it is skipped anyway.