将acrobat.acroapp嵌入到Excel用户窗体中

时间:2018-08-27 09:59:42

标签: excel-vba acrobat-sdk

我必须使用VBA来填写PDF表格...

Dim acroAppObj As Acrobat.AcroApp : Set acroAppObj = CreateObject("AcroExch.App")
Dim acroADocObj As Acrobat.AcroAVDoc : Set acroADocObj = CreateObject("AcroExch.AVDoc")

If Not acroADocObj.Open(lPDFFormFileName, "") Then Exit Sub
acroAppObj.Show 
Dim acroFormObj As AFORMAUTLib.AFormApp  Set acroFormObj = CreateObject("AFormAut.App")

acroFormObj.Fields("First Field).Value = "First Value"
'..... populate all the fields in the form ...
acroFormObj.Fields("Last Field).Value = "Last Value"  

acroADocObj.Close (True)
acroAppObj.CloseAllDocs
acroAppObj.Exit
acroAppObj.Hide

Set acroFormObj = Nothing
Set acroPDocObj = Nothing 
Set acroADocObj = Nothing 
Set acroAppObj = Nothing 

这将使用一个独立于excel用户窗体的窗口。

是否可以将Acrobat.AcroApp实例嵌入到excel用户窗体中?

0 个答案:

没有答案