Live-Forum - Die aktuellen Beiträge
Anzeige
Archiv - Navigation
1096to1100
Aktuelles Verzeichnis
Verzeichnis Index
Übersicht Verzeichnisse
Vorheriger Thread
Rückwärts Blättern
Nächster Thread
Vorwärts blättern
Anzeige
HERBERS
Excel-Forum (Archiv)
20+ Jahre Excel-Kompetenz: Von Anwendern, für Anwender
Inhaltsverzeichnis

Excel Daten sollen ein PDF Formular füllen

Excel Daten sollen ein PDF Formular füllen
Yuna
Hallo an alle,
ich hab folgendes Problem. Ich will bestimmte Daten die ich in Excel eintragen habe per Buttonklick in ein PDF Fomular eintragen lassen. Ich will nicht das Exceldatenblatt in ein PDF wandeln, sondern das ich in Excel eine Datenliste habe, in der ich viele verschiedene Daten eintrage (z. B. Name, Vormane, Adresse und so weiter) und per Buttonklick bestimmte Daten in ein von mir erstelltes PDF Formular eingetragen wird. Das PDF Formular hat Textfelder die dann die gleiche Bezeichnung haben, wie die Überschriften in der Exceltabelle.
Ich sowas möglich und wenn ja, wie?
Ich bin sehr dankebar über jede Hilfe. DANKE!!
Gruß Yuna
AW: Excel Daten sollen ein PDF Formular füllen
19.08.2009 10:58:31
Ramses
Hallo
Das kommt darauf an, welches PDF Programm du verwendest.
Mit dem Adobe Reader geht es schon gar nicht, und andere unterstützen VBA nur rudimentär.
Ich würde mal in einem forum nachfragen das dein PDF Programm behandelt.
Gruss Rainer
AW: Excel Daten sollen ein PDF Formular füllen
19.08.2009 11:08:25
Yuna
Hallo Rainer,
also ich benutze Adobe Acrobat 8 Professional. Würde das mit Excel denn klappen?
Gruß Yuna
AW: Excel Daten sollen ein PDF Formular füllen
19.08.2009 12:03:29
pointofview
Hallo Yuna,
hab noch was gefunden:
Print a Single Worksheet to a PDF File:
Option Explicit
Sub PrintToPDF_Early()
'Author       : Ken Puls (www.excelguru.ca)
'Macro Purpose: Print to PDF file using PDFCreator
' (Download from http://sourceforge.net/ _
projects/pdfcreator/)
'   Designed for early bind, set reference to PDFCreator
Dim pdfjob As PDFCreator.clsPDFCreator
Dim sPDFName As String
Dim sPDFPath As String
'/// Change the output file name here! ///
sPDFName = "testPDF.pdf"
sPDFPath = ActiveWorkbook.Path & Application.PathSeparator
'Check if worksheet is empty and exit if so
If IsEmpty(ActiveSheet.UsedRange) Then Exit Sub
Set pdfjob = New PDFCreator.clsPDFCreator
With pdfjob
If .cStart("/NoProcessingAtStartup") = False Then
MsgBox "Can't initialize PDFCreator.", vbCritical + _
vbOKOnly, "PrtPDFCreator"
Exit Sub
End If
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0    ' 0 = PDF
.cClearCache
End With
'Print the document to PDF
ActiveSheet.PrintOut copies:=1, ActivePrinter:="PDFCreator"
'Wait until the print job has entered the print queue
Do Until pdfjob.cCountOfPrintjobs = 1
DoEvents
Loop
pdfjob.cPrinterStop = False
'Wait until PDF creator is finished then release the objects
Do Until pdfjob.cCountOfPrintjobs = 0
DoEvents
Loop
pdfjob.cClose
Set pdfjob = Nothing
End Sub

Print Multiple Worksheets to Multiple PDF Files:
Option Explicit
Sub PrintToPDF_MultiSheet_Early()
'Author       : Ken Puls (www.excelguru.ca)
'Macro Purpose: Print to PDF file using PDFCreator
' (Download from http://sourceforge.net/ _
projects/pdfcreator/)
'   Designed for early bind, set reference to PDFCreator
Dim pdfjob As PDFCreator.clsPDFCreator
Dim sPDFName As String
Dim sPDFPath As String
Dim lSheet As Long
Set pdfjob = New PDFCreator.clsPDFCreator
sPDFPath = ActiveWorkbook.Path & Application.PathSeparator
If pdfjob.cStart("/NoProcessingAtStartup") = False Then
MsgBox "Can't initialize PDFCreator.", vbCritical + _
vbOKOnly, "PrtPDFCreator"
Exit Sub
End If
For lSheet = 1 To ActiveWorkbook.Sheets.Count
'Check if worksheet is empty and skip if so
If Not IsEmpty(ActiveSheet.UsedRange) Then
With pdfjob
'/// Change the output file name here! ///
sPDFName = "testPDF" & Sheets(lSheet).Name & ".pdf"
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0    ' 0 = PDF
.cClearCache
End With
'Print the document to PDF
Worksheets(lSheet).PrintOut copies:=1, ActivePrinter:="PDFCreator"
'Wait until the print job has entered the print queue
Do Until pdfjob.cCountOfPrintjobs = 1
DoEvents
Loop
pdfjob.cPrinterStop = False
'Wait until PDF creator is finished then release the objects
Do Until pdfjob.cCountOfPrintjobs = 0
DoEvents
Loop
End If
Next lSheet
pdfjob.cClose
Set pdfjob = Nothing
End Sub

Print Multiple Worksheets to a Single PDF File:
Option Explicit
Sub PrintToPDF_MultiSheetToOne_Early()
'Author       : Ken Puls (www.excelguru.ca)
'Macro Purpose: Print to PDF file using PDFCreator
' (Download from http://sourceforge.net/ _
projects/pdfcreator/)
'   Designed for early bind, set reference to PDFCreator
Dim pdfjob As PDFCreator.clsPDFCreator
Dim sPDFName As String
Dim sPDFPath As String
Dim lSheet As Long
Dim lTtlSheets As Long
'/// Change the output file name here! ///
sPDFName = "Consolidated.pdf"
sPDFPath = ActiveWorkbook.Path & Application.PathSeparator
Set pdfjob = New PDFCreator.clsPDFCreator
'Make sure the PDF printer can start
If pdfjob.cStart("/NoProcessingAtStartup") = False Then
MsgBox "Can't initialize PDFCreator.", vbCritical + _
vbOKOnly, "Error!"
Exit Sub
End If
'Set all defaults
With pdfjob
.cOption("UseAutosave") = 1
.cOption("UseAutosaveDirectory") = 1
.cOption("AutosaveDirectory") = sPDFPath
.cOption("AutosaveFilename") = sPDFName
.cOption("AutosaveFormat") = 0    ' 0 = PDF
.cClearCache
End With
'Print the document to PDF
lTtlSheets = Application.Sheets.Count
For lSheet = 1 To Application.Sheets.Count
On Error Resume Next 'To deal with chart sheets
If Not IsEmpty(Application.Sheets(lSheet).UsedRange) Then
Application.Sheets(lSheet).PrintOut copies:=1, ActivePrinter:="PDFCreator"
Else
lTtlSheets = lTtlSheets - 1
End If
On Error GoTo 0
Next lSheet
'Wait until all print jobs have entered the print queue
Do Until pdfjob.cCountOfPrintjobs = lTtlSheets
DoEvents
Loop
'Combine all PDFs into a single file and stop the printer
With pdfjob
.cCombineAll
.cPrinterStop = False
End With
'Wait until PDF creator is finished then release the objects
Do Until pdfjob.cCountOfPrintjobs = 0
DoEvents
Loop
pdfjob.cClose
Set pdfjob = Nothing
End Sub
Gruss
PointOfView
Oliver
Anzeige
AW: Excel Daten sollen ein PDF Formular füllen
19.08.2009 12:07:47
Yuna
Hallo PointOfView,
ich leider nicht ganz was ich suche. Ich will ja kein PDF erstellen oder von Excel auf PDF wandeln lassen, sondern ein bestehendes PDF mit Textfeldern vom Excel befüllen lassen!!
Trotzdem vielen Dank.
Gruß Yuna
AW: Excel Daten sollen ein PDF Formular füllen
19.08.2009 12:15:51
pointofview
Hallo Yuna,
Sorry, hab ich wohl falsch verstanden.
Gruss
PointOfView
AW: Excel Daten sollen ein PDF Formular füllen
19.08.2009 12:47:13
Yuna
Hallo PointOfView,
macht nix, ich halt schwer zu beschreiben und somit auch schwerer zu verstehen.
Aber trotzdem danke für de Mühe.
Gruß Yuna
Schau mal...
19.08.2009 12:58:35
Ramses
Hallo
... ob du damit zurecht kommst
http://forums.adobe.com/thread/302309
Gruss Rainer
Anzeige
AW: Schau mal...
19.08.2009 13:21:33
Yuna
Hallo Rainer,
leider nein. Ich will ja Excel nutzen um das PDF Formular zu füllen und nicht Access...
oje, ich dachte nicht das das so schwer wird...
Ich danke dir trotzdem.
Gruß Yuna
AW: Schau mal...
19.08.2009 13:25:48
Ramses
Hallo
Das hat mit ACCESS nichts zu tun, VBA in ACCESS ist gleich wie in EXCEL.
Es geht ja nur um das Prinzip wie die Formularfelder anzusprechen sind, im Beispielcode eben mit der Schleife
Gruss Rainer
PS:
Wenn es einfach wäre, dann hätte es jeder :-)
AW: Schau mal...
19.08.2009 13:46:35
Yuna
Hallo Rainer,
ok, dann muss ich mit diesen VBA Code noch mal auseinander setzen. Das habe ich noch nie gemacht. Wie bekomme ich denn diesen VBA Code in excel rein?
Sorry das ich so dumm frage, hab bis jetzt nicht so viel mit VBA gemacht.
Gruß Yuna
P.S.
hast du auch wieder recht, dann hätte es jeder und wir hätten dieses tolle Forum nicht... ;-)
Anzeige
Noch offen. Tut mir leid...
19.08.2009 13:52:41
Ramses
Hallo
"...hab bis jetzt nicht so viel mit VBA gemacht.."
Das ist ja nun nichts nachteiliges
"...Wie bekomme ich denn diesen VBA Code in excel rein?.."
Das sagt mir jedoch, dass du dir daran die Zähne ausbeissen wirst und es mindestens drei Klassen zu hoch für Dich ist.
Kann das leider nicht mehr entwickeln, da ich auf meinem neuen Rechner keinen Acrobat mehr habe, und für diesen Code sind die ganzen Klassenbibliotheken des Programmes nötig.
Sorry,.. da muss jemand dahinter der EXCEL und ACROBAT 8 auf seinem Rechner hat
Gruss Rainer
AW: Noch offen. Tut mir leid...
19.08.2009 15:03:10
Yuna
Hallo Rainer,
schade, du wohnst nicht zufällig in Berlin?
Gruß Yuna
Anzeige
AW: Noch offen. Tut mir leid...
19.08.2009 15:27:08
Ramses
Hallo
Leider nein.... :-)
Etwa 1000 km südlich in der Schweiz :-)
Gruss Rainer
AW: Noch offen. Tut mir leid...
19.08.2009 15:51:02
Yuna
Hallo,
schade, sonst hätte ich dich eingeladen, um das bei mir auf dem Laptop zu Programmieren... und vorallem mir ein wenig näher zu bringen wie das funktioniert...
Ok, dann muss ich irgendwie mich da durch beissen.
Danke für die hilfe.
Gruß Yuna
Kannst Du mir das PDF Formular schicken ?
19.08.2009 16:03:19
NoNet
Hallo Yuna,
ich stimme Ramses (Rainer) zu : Diese Aufgabe ist für Deinen Kenntnisstand mind. um 3 Nummern zu hoch.
Das ist schon für geübte VBA-Programmierer nicht ganz einfach, aber für einen "Newbie" nahezu unlösbar.
Wenn Du mir das PDF-Formular zusendest, bzw. in einem weiteren Beitrag hochlädst (ungeschützt und als ZIP gepackt !) und die URL hier postest, dann könnte ich mal versuchen, den Code von http://forums.adobe.com/thread/302309 an das Formular anzupassen. Ist allerdings ohne Gewähr, dass das klappt, da ich das auch noch nie gemacht habe ("Jungfrau" ;-)
Gruß, NoNet
Anzeige
AW: Kannst Du mir das PDF Formular schicken ?
20.08.2009 09:13:08
Yuna
Hallo NoNet,
ja, ich glaube auch, dass das zu hoch für mich ist. Anbei der link zur Datei:
https://www.herber.de/bbs/user/63936.zip
Wenn du es nicht hin bekommst, ist es auch nicht schlimm. Ich hab es wenigstens versucht. DANKE!!!
Gruß Yuna

300 Forumthreads zu ähnlichen Themen

Anzeige
Anzeige
Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige

Beliebteste Forumthreads (12 Monate)

Anzeige
Anzeige
Anzeige