' Copyright (c) 2021 ActivePDF, Inc. ' ActivePDF Toolkit 2018 ' Example generated 02/25/21 Dim FSO, strPath, intOpenInputFile, strXMLData ' Get current path Set FSO = CreateObject("Scripting.FileSystemObject") strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" Set FSO = Nothing ' Instantiate Object Set oTK = CreateObject("APToolkit.Object") ' This example will take a filled PDF form and export the data to XML ' Open the filled PDF form intOpenInputFile = oTK.OpenInputFile(strPath & "formx-filled.pdf") If intOpenInputFile <> 0 Then ErrorHandler "OpenInputFile", intOpenInputFile End If ' Extract the XML Data to a variable ' Use the strXMLData variable to handle the XML data strXMLData = oTK.ExportFormAsXML("User", "") ' Close the filled PDF form oTK.CloseInputFile ' Release Object Set oTK = Nothing ' Process Complete Wscript.Echo("Done!") ' Error Handling Sub ErrorHandler(method, outputCode) Wscript.Echo("Error in " & method & ": " & outputCode) End Sub