6.5
© 2007 ABBYY. All rights reserved.
55
• FormPages
• Field
• Fields
The form data are accessible through the global object Form of the FormDocument type.
Enumerations
Enum TErrorLevel
Enum TErrorLevel
EL_Warning
EL_Error
EL_CriticalError
End Enum
Determines the level of an error:
EL_Warning corresponds to a warning, a form data error. The form data with these warnings and errors can be exported.
EL_Error means a form data error. Data with this error can be exported.
EL_CriticalError refers to a critical error. Data with these errors can be exported. In particularly, all run time errors of the VB script
belong to this level.
Enum TDateFormat
Enum TDateFormat
DF_DayMonthYear
DF_MonthDayYear
DF_YearMonthDay
End Enum
Specifies the date format (the sequence of its parts)
Enum TYearLength
Enum TYearLength
YL_TwoDigits
YL_FourDigits
End Enum
Specifies the number of digits used for the year:
YL_TwoDigits means that two digits will be used for the year (“YY”)
YL_FourDigits means that four digits will be used for the year (“YYYY”)
FormDocument class
IDString property
IDString As String is a read–only property. It returns the unique ID of the form.
Pages property
Pages As FormPages is a read–only property. It returns the collection of all form pages.
GetPagesForTemplate method
The GetPagesForTemplate( TemplateName As String ) As FormPages returns all the form pages matched with the specified
template.
SetError method
For the description of the SetError( ByVal ErrorMessage, Optional ByVal ErrorFields, Optional ByVal ErrorLevel ) method, refer to the
"Check support" section.
SetDefaultDateFormat method
The SetDefaultDateFormat( ByVal DateType As TDateFormat, ByVal YearLength As TYearLength, ByRef DateSeparator As String )
method sets the default format date parameters for the execution period or until the method is called next time. The values of these
parameters are used by the Field.ToDate() function when it is called without one or two parameters.
Parameters:
• DateType specifies the date format (see Enum TDateFormat).
• YearLength specifies the number of digits in the year (see Enum TYearLength).
• DateSeparator specifies the date delimiter. The delimiter should be one character only, for example, a full stop (“.”).
SetDefaultDecimalSeparator method
The SetDefaultDecimalSeparator( ByRef DecimalSeparator As String ) method sets the default number delimiter for the
execution period or till the method is called next time. The values of these parameters are used by the Field.ToDecimal() method
when it is called without the parameter.
Parameters:
• DecimalSeparator specifies the decimal number delimiter. The delimiter should be one character only, for example, a full stop
(“.”).
FormatDate method
Function FormatDate( ByRef DateValue As Date, ByVal Optional DateType As TDateFormat, ByVal Optional YearLength As
TYearLength, ByRef Optional DateSeparator As String ) As String
Converts DateValue to a string of the specified format.
Parameters:










