billandrew
Well-known Member
- Joined
- Mar 9, 2014
- Messages
- 743
Evening
Looking to remove the .xlsx from the export to PDF in the below script.
Thanks guys
Looking to remove the .xlsx from the export to PDF in the below script.
Thanks guys
Code:
Sub PDF()Dim wb As String
Dim filepath As String
wb = ActiveWorkbook.Name
filepath = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "\" & wb & ".pdf"
ActiveSheet.ExportAsFixedFormat _
Type:=xlTypePDF, _
Filename:=filepath, _
Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=True
End Sub