I have 500 number in excel file need to mass create PDF files using <acronym title="visual basic for applications" style="border-width: 0px 0px 1px; border-bottom-style: dotted; border-bottom-color: rgb(0, 0, 0); cursor: help; color: rgb(51, 51, 51); background-color: rgb(250, 250, 250); ">VBA</acronym>
I’m using below Macro to write on PDF, however I failed to do mass PDF files creation from my excel list, any one can help please
Sub WriteToAdobeFields()
'topmostSubform[0].Page2[0].f2_12_0_[0]
Dim AcrobatApplication As Acrobat.CAcroApp
Dim AcrobatDocument As Acrobat.CAcroAVDoc
Dim fcount As Long
Dim sFieldName As String
Set AcrobatApplication = CreateObject("AcroExch.App")
Set AcrobatDocument = CreateObject("AcroExch.AVDoc")
If AcrobatDocument.Open("C:\Users\Bohaa\Desktop\bo7a.pdf", "") Then
AcrobatApplication.Show
Set AcroForm = CreateObject("AFormAut.App")
Set Fields = AcroForm.Fields
fcount = Fields.Count
Fields("Text2").Value = "9713333" ' WORKS!
Else
MsgBox "failure"
End If
AcrobatApplication.Exit
Set AcrobatApplication = Nothing
Set AcrobatDocument = Nothing
Set Field = Nothing
Set Fields = Nothing
Set AcroForm = Nothing
End Sub
I’m using below Macro to write on PDF, however I failed to do mass PDF files creation from my excel list, any one can help please
Sub WriteToAdobeFields()
'topmostSubform[0].Page2[0].f2_12_0_[0]
Dim AcrobatApplication As Acrobat.CAcroApp
Dim AcrobatDocument As Acrobat.CAcroAVDoc
Dim fcount As Long
Dim sFieldName As String
Set AcrobatApplication = CreateObject("AcroExch.App")
Set AcrobatDocument = CreateObject("AcroExch.AVDoc")
If AcrobatDocument.Open("C:\Users\Bohaa\Desktop\bo7a.pdf", "") Then
AcrobatApplication.Show
Set AcroForm = CreateObject("AFormAut.App")
Set Fields = AcroForm.Fields
fcount = Fields.Count
Fields("Text2").Value = "9713333" ' WORKS!
Else
MsgBox "failure"
End If
AcrobatApplication.Exit
Set AcrobatApplication = Nothing
Set AcrobatDocument = Nothing
Set Field = Nothing
Set Fields = Nothing
Set AcroForm = Nothing
End Sub