Hello,
I am trying to save a workbook (output_workbook) as a pdf file to a users desktop. Although microsoft appears to be doing something no file is created. can any one help ? thanks
kind regards
Kaps
I am trying to save a workbook (output_workbook) as a pdf file to a users desktop. Although microsoft appears to be doing something no file is created. can any one help ? thanks
kind regards
Kaps
VBA Code:
Sub SaveActiveWorkbookAsPDF()
'Create and assign variables
Dim saveLocation As String
saveLocation = CreateObject("WScript.Shell").SpecialFolders("Desktop") & "Myfile.pdf"
'Save active workbook as PDF
output_workbook.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=saveLocation
End Sub