commit Method
Executes a series of operations that was added to the undo stack of an FPHTMLUndoTransaction object. For example, if you create an FPHTMLUndoTransaction object, and then run a macro, the commit method allows the macro to continue or, if the macro is finished, the commit method prevents the rollback of the effects of the macro. In other words, the series of operations the macro performed cannot be undone.
expression.commit
expression An expression that returns an FPHTMLUndoTransaction object.
Example
Use the createUndoTransaction method of the IFPDocument object to create an FPHTMLUndoTransaction object. The String argument passed in with the createUndoTransaction method is added to the Undo command on the Edit menu when the commit method is called. The following example creates an FPHTMLUndoTransaction object illustrating the abort and commit methods.
Private Sub CreateUndoTransaction()
Dim objDoc As FPHTMLDocument
Dim objTansaction As FPHTMLUndoTransaction
On Error GoTo CreateUndoTransactionError
Set objDoc = ActiveDocument
Set objTansaction = objDoc _
.CreateUndoTransaction("Last Macro")
objDoc.body.insertAdjacentHTML "BeforeEnd", _
"<b>Added by FP Programmability</b>"
objTansaction.commit
ExitCreateUndoTransaction:
Exit Sub
CreateUndoTransactionError:
objTansaction.abort
GoTo ExitCreateUndoTransaction
End Sub