SaveToAPrevious
Document ShellThe
SaveToAPreviousmethod copies the content of this draft to the specified previous draft of the same document.
ODDraft SaveToAPrevious (in ODDraft to);
to- A reference to the destination draft object, or
kODNULLfor the draft immediately previous to (below) this draft.- return value
- A reference to this draft object.
DISCUSSION
If thetoparameter is null, it is set to the draft immediately previous to (below) this draft. This method copies the content of all the drafts between this draft (inclusive) and thetodraft (exclusive) to thetodraft. It then makes all the drafts from this draft (inclusive) to thetodraft (exclusive) empty. The document shell can call theCollapseDraftsmethod of this draft's document object to delete these empty drafts from the document.For this method to be successful this draft must have a reference count of 1, meaning that only the caller has a reference to this draft object. In addition, there must be no outstanding drafts between this draft (exclusive) and the
todraft (exclusive). An outstanding draft has a reference count greater than 0, meaning that it is being used by some object.Calling this method is equivalent to calling the
SaveToAPrevDraftmethod of this draft's document, passing this draft as thefromparameter, and passing the sametoparameter.EXCEPTIONS
kODErrOutstandingDraft- There are outstanding drafts between this draft (exclusive) and the
todraft (exclusive) or this draft has a reference count greater than 1.SEE ALSO
TheODDocument::CollapseDraftsmethod (page 138).
TheODDocument::SaveToAPrevDraftmethod (page 144).