Hallo, ich brauche dringend Hilfe..
Ich bin dabei mein VBA Code in Vb.net zu konvertieren.
Dabei bekomme ich bei der Erstellung bzw Mergen von PDF Dateien Probleme..
Folgenden Code kann ich fehlerfrei über VBA ausführen. Vielleicht hat hier ja jmd. ein Vorschlag, wie ich dieses Modul über vb.net erstellen kann..
Danke!!
*Topic verschoben*
Ich bin dabei mein VBA Code in Vb.net zu konvertieren.
Dabei bekomme ich bei der Erstellung bzw Mergen von PDF Dateien Probleme..
Folgenden Code kann ich fehlerfrei über VBA ausführen. Vielleicht hat hier ja jmd. ein Vorschlag, wie ich dieses Modul über vb.net erstellen kann..
Danke!!
VB.NET-Quellcode
- Sub MergeAllExt()
- Dim objCAcroPDDocDestination As Acrobat.CAcroPDDoc
- Dim objCAcroPDDocSource As Acrobat.CAcroPDDoc
- Set objCAcroPDDocDestination = CreateObject("AcroExch.PDDoc")
- Set objCAcroPDDocSource = CreateObject("AcroExch.PDDoc")
- Dim OrdnerDestination(0 To 17) As String
- OrdnerDestination(0) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Grundformen.pdf"
- OrdnerDestination(1) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Vollpappe.pdf"
- OrdnerDestination(2) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Wellpappe.pdf"
- OrdnerDestination(3) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Versand.pdf"
- OrdnerDestination(4) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Polster.pdf"
- OrdnerDestination(5) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Display.pdf"
- OrdnerDestination(6) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Kreativ.pdf"
- OrdnerDestination(7) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Stuetzen.pdf"
- OrdnerDestination(8) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Stege.pdf"
- OrdnerDestination(9) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_a1.pdf"
- OrdnerDestination(10) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_a2.pdf"
- OrdnerDestination(11) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_b.pdf"
- OrdnerDestination(12) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_c.pdf"
- OrdnerDestination(13) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_d.pdf"
- OrdnerDestination(14) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_e.pdf"
- OrdnerDestination(15) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_f.pdf"
- OrdnerDestination(16) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Ecma_x.pdf"
- OrdnerDestination(17) = "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\StandardTemp.pdf\Fefco.pdf"
- objCAcroPDDocDestination.Open OrdnerDestination(0)
- Dim tt As Integer
- For tt = 1 To 17
- objCAcroPDDocSource.Open OrdnerDestination(tt)
- If objCAcroPDDocDestination.InsertPages(objCAcroPDDocDestination.GetNumPages - 1, objCAcroPDDocSource, 0, objCAcroPDDocSource.GetNumPages, 0) Then
- Else
- MsgBox (OrdnerDestination(tt) & " nicht gefunden")
- End If
- objCAcroPDDocSource.Close
- Next tt
- objCAcroPDDocDestination.Save 1, "\\ERPA-SERVER\ERPA-Updates\ERPA-Standards\KatalogDE\Rohversion.pdf"
- objCAcroPDDocDestination.Close
- Set objCAcroPDDocSource = Nothing
- Set objCAcroPDDocDestination = Nothing
- 'MsgBox "Documents Merged!"
- End Sub
*Topic verschoben*
Dieser Beitrag wurde bereits 1 mal editiert, zuletzt von „Marcus Gräfe“ ()