' Copyright (c) 2021 ActivePDF, Inc. ' ActivePDF Toolkit 2018 ' Example generated 02/25/21 Dim FSO, strPath, intOpenInputFile, strName, _ strFormat, numMaxLength ' Get current path Set FSO = CreateObject("Scripting.FileSystemObject") strPath = FSO.GetFile(Wscript.ScriptFullName).ParentFolder & "\" Set FSO = Nothing ' Instantiate Object Set oTK = CreateObject("APToolkit.Object") ' Open the template PDF intOpenInputFile = oTK.OpenInputFile(strPath & "form.pdf") If intOpenInputFile <> 0 Then ErrorHandler "OpenInputFile", intOpenInputFile End If ' Specify a field to return as an object Set oFI = oTK.FieldInfo("name", 1) ' Get the name of the field strName = oFI.Name Wscript.Echo(strName) ' Get the format string of the field strFormat = oFI.FormatString Wscript.Echo(strFormat) ' Get the max length of the field numMaxLength = oFI.MaxLength Wscript.Echo(numMaxLength) ' Release Object Set oFI = Nothing ' Finish by closing the input file 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