FPHTMLUndoTransaction Object
Represents the cache where the actions performed by a macro are stored. The FPHTMLUndoTransaction object includes methods that continue or stop the specified transaction.
Using the FPHTMLUndoTransaction Object
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 objTransaction As FPHTMLUndoTransaction
On Error GoTo CreateUndoTransactionError
Set objDoc = ActiveDocument
Set objTransaction = objDoc _
.CreateUndoTransaction("Last Macro")
objDoc.body.insertAdjacentHTML "BeforeEnd", _
"<b>Added by FP Programmability</b>"
objTransaction.Commit
ExitCreateUndoTransaction:
Exit Sub
CreateUndoTransactionError:
objTransaction.abort
GoTo ExitCreateUndoTransaction
End Sub