Hello everyone,
I am kindly requesting support from you guys as I am struggeling to make this VBA code work.
I would like it to save the active sheet as a PDF onto a SharePoint folder, but I always get the following error message :
I have full access to our SharePoint environement and if I try to save it with the 'save as copy' Excel option, it works. I guess the issue might come from the format I want to apply to the filename.
Thank you very much in advance for your support !
I am kindly requesting support from you guys as I am struggeling to make this VBA code work.
I would like it to save the active sheet as a PDF onto a SharePoint folder, but I always get the following error message :
VBA Code:
Sub ExportDashboardToPDF()
Dim PathName As String
Dim FileName As String
PathName = "//sites.company.com/sites/OurTeam/Shared%20Documents/General/"
FileName = Format(Date, "yyyy-mm-dd") & "_ExcelFileName" & ".pdf"
ActiveSheet.ExportAsFixedFormat Type:=xlTypePDF, FileName:=PathName & FileName _
, Quality:=xlQualityStandard, IncludeDocProperties:=False, IgnorePrintAreas _
:=False, OpenAfterPublish:=False
End Sub
I have full access to our SharePoint environement and if I try to save it with the 'save as copy' Excel option, it works. I guess the issue might come from the format I want to apply to the filename.
Thank you very much in advance for your support !