似乎缺少关于adobe属性/方法的文档。我有Adobe SDK API,但它缺少任何细节。
我有将数据从Excel文档写入PDF表单的代码。它遍历所有字段并将数据写入PDF表单。如果PDF表单字段类型是numeric,我将抛出错误。
我需要测试PDF表单域是否为数字。如果是,我会将该字段名添加到集合中,并在该过程完成后显示。
我查找了GetField属性,但找不到任何文档。类似于:
IF jso.getfield(strField).type=numeric
colFail.Add=strField发布于 2017-04-27 01:48:16
AFter查看Peh提供的链接(谢谢Peh);我是这样处理它的:
'Fill the form fields.
For r = 20 To 149
strField = ToPDFsh.Cells(r, 3).Value
strFieldVal = ToPDFsh.Cells(r, 4).Value
If strFieldVal = "" Then GoTo BlankVal
objJSO.GetField(strField).Value = strFieldVal
On Error GoTo ErrHandlerBlankVal:下一个r`
等等..。然后
ErrHandler:
e = e + 1
If e > 7 Then
MsgBox "Something Bad happend... :(" & vbNewLine & "Form not filled", vbCritical, "Failed"
GoTo ErrHandlerExit
End If
colFail.Add strField
Resume Next
Exit SubErrHandlerExit:‘关闭窗体而不保存更改。objAcroAVDoc.Close为True
'Close the Acrobat application.
objAcroApp.Exit
'Release the objects and exit.
Set objJSO = Nothing
Set objAcroPDDoc = Nothing
Set objAcroAVDoc = Nothing
Set objAcroApp = Nothing
'Enable the screen.
Application.ScreenUpdating = True
Exit Sub结束子对象
https://stackoverflow.com/questions/43602826
复制相似问题