Ich möchte per Makro eine Arbeitsmappe "Test" als pdf in einen Ordner C:/Daten/Excel/ speichern.
Dateiname dabei "Ansicht" und aktuelles Datum.
Wie sieht der Code dazu aus?
Danke Euch.
Gruß
Tommy
Sub exportPDF()
Dim strPath As String, strFileName As String
strPath = "C:\Daten\Excel\"
If Right(strPath, 1) <> "\" Then strPath = strPath & "\"
strFileName = strPath & "Ansicht_" & Format(Date, "yyyy_MM_dd") & ".pdf"
ActiveWorkbook.ExportAsFixedFormat Type:=xlTypePDF, _
Filename:=strFileName, _
Quality:=xlQualityStandard, _
IncludeDocProperties:=True, _
IgnorePrintAreas:=False, _
OpenAfterPublish:=True
End Sub