DeleteAppendix(FileName As String) As Integer

Form object

Removes a specific appendix belonging to the current form. The image file containing the appendix is deleted. FileName is the file name, including the path, of the appendix to be removed. The method returns 0 if the operation was successful, 1 if the appendix could not be found in the form (for example, if it was spelled incorrectly), and 2 if the operation was unsuccessful for some other reason (for example, if the image file could not be deleted).

FormScanEnd would be an appropriate event from which to call this method.

This method cannot be used in FORMS Interpret if you are importing image files, because in that case you do not have access to appendices. The methods work in Interpret only if you are interpreting forms from the database (forms that have been scanned using FORMS Scan).

Note: If the appendices are optionally two-sided, and if you want to check the number of appendices which belong to the current form after calling DeleteAppendix, call GetNoOfAppendixFiles rather than GetNoOfAppendices, as GetNoOfAppendices can result in an incorrect value in this case.

DeleteAllAppendices

The Form object