Vba 使用vb到MS Access从PDF中提取富文本字段
我在文件中循环,我有一个可填充的PDF表单,可以从中提取数据。除了从富格文本字段中提取外,其他一切都正常工作。我得到了数据,但它没有格式化 我的代码如下。例如,“General_Match_Comments”是我在PDF中的富文本字段,但当它进入Access数据库时,它缺少格式设置,例如多行Vba 使用vb到MS Access从PDF中提取富文本字段,vba,ms-access,pdf,Vba,Ms Access,Pdf,我在文件中循环,我有一个可填充的PDF表单,可以从中提取数据。除了从富格文本字段中提取外,其他一切都正常工作。我得到了数据,但它没有格式化 我的代码如下。例如,“General_Match_Comments”是我在PDF中的富文本字段,但当它进入Access数据库时,它缺少格式设置,例如多行 Dim AcroApp As Acrobat.CAcroApp Dim theForm As Acrobat.CAcroPDDoc Dim jso As Object Dim oFSO As Obje
Dim AcroApp As Acrobat.CAcroApp
Dim theForm As Acrobat.CAcroPDDoc
Dim jso As Object
Dim oFSO As Object
Dim oFolder As Object
Dim oFile As Object
Set AcroApp = CreateObject("AcroExch.App")
Set theForm = CreateObject("AcroExch.PDDoc")
Set oFolder = oFSO.GetFolder(varfolder)
For Each oFile In oFolder.Files
theForm.Open (oFile)
Set jso = theForm.GetJSObject
Dim rstblEvalHeader As Recordset
Set rstblEvalHeader = CurrentDb.OpenRecordset(Name:="tblEvalHeader", Type:=RecordsetTypeEnum.dbOpenDynaset)
With rstblEvalHeader
.AddNew
' get the information from the form fields Text1 and Text2
!Referee = jso.getField("Referee").Value
!EvalDate_af_date = jso.getField("EvalDate_af_date").Value
!Position = jso.getField("R1R2").Value
!Event_Site = jso.getField("Event_Site").Value
!Partner = jso.getField("Partner").Value
!Level_of_Play = jso.getField("Level_of_Play").Value
!Time_Court = jso.getField("Time_Court").Value
!Teams = jso.getField("Teams").Value
!Observer = jso.getField("Observer").Value
!Match_Scores = jso.getField("Match_Scores").Value
!Match_Difficulty = jso.getField("Match_Difficulty").Value
!General_Match_Comments = jso.getField("General_Match_Comments").Value
!Result = jso.getField("Result").Value
strGUID = !ID
strGUID = Replace(Replace(strGUID, "{guid ", ""), "}}", "}")
!SID = strGUID
.Update
End With
theForm.Close
Next oFile
表格的类型是什么?它是在哪个库中定义的,有什么文档吗?我能找到的解决方案只有Word。问题是一样的,如何保留RTF。也许你能采纳我的建议