I have 500 number in excel file need to mass create PDF files using VBA
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 SubI have 500 number in excel file need to mass create PDF files using VBA
I’m using below Macro to write on PDF, however I failed to do mass 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 SubI have 500 number in excel file need to mass create PDF files using VBA
I’m using below Macro to write on PDF, however I failed to do mass 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