PDF Split & Merge mit VBA
30.10.2013 17:10:15
Rocio
mit dem unten genannten Code erzeuge ich aus Excel Dateien die dazugehörige PDFs, welche gleichzeitig gespeichert werden. Die PDFs muss ich dann mit Hilfe von PDF Split and merge zusammenfügen.
Kann man auch mit VBA die PDF Datei wie gewohnt erzeugen, speichern und zusätzlich in PDF split and merge einfügen?
oder mit einer unabhängigen Funktion, mehrere PDF Dateien zusammenfügen sodass es sich nur ein Dokument erzeugen und speichern?
Für eure Hilfe bedanke ich mich herzlich :)
Rocio
Sub speichern_unter_PDF()
Dim sPath As String
sPath = "C:\Temple\2013" 'ANPASSEN
If sPath = "" Then
MsgBox "Die Datei muß zuerst gespeichert werden"
Exit Sub
End If
sPath = IIf(Right$(sPath, 1) = Application.PathSeparator, sPath, sPath & Application. _
PathSeparator)
Dim rng As Range
Set rng = ActiveSheet.Range("A1:K67") 'ANPASSEN
On Error GoTo ENDE
Application.DisplayAlerts = False
Dim PDF_NAME As String
PDF_NAME = sPath & "Täglicher RTF Bericht zum_ " & Format(Date, "yyyymmdd") - 1 & ".pdf" ' _
_
ANPASSEN
If Not PDF_NAME = "Falsch" Then
rng.ExportAsFixedFormat Type:=xlTypePDF, Filename:=PDF_NAME, Quality:=xlQualityStandard, _
IncludeDocProperties:=True, IgnorePrintAreas:=False, OpenAfterPublish:=True
End If
ENDE:
Application.DisplayAlerts = True
End Sub