I need to create a macro that will save an excel document as a PDF file to any user's desktop (i.e. multiple people will be using this document/macro).
Here is VBA code I have so far:
Sub CreatePDF()
'
' CreatePDF Macro
'
'
ChDir "C:\Users\Public\Desktop"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\Public\Desktop\QuickView Update Dec_2017.pdf", Quality:= _
xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub
I think the issue is with the directory it's saving to (in the instances where this code says "Public" in the file path, I had changed that from my username which was initially populated).
Does anyone know a way to specify a generic path to save this document as a PDF to any users' desktop?