SaveToAPrevDraft
Document ShellThe SaveToAPrevDraft method consolidates the changes in the specified range of drafts.
void SaveToAPrevDraft (in ODDraft from, in ODDraft to);
from- A reference to the first (most recent) draft in the range.
to- A reference to the last (oldest) draft in the range.
DISCUSSION
If thetoparameter iskODNULL, it is set to the draft immediately previous to thefromdraft. This method copies the content of all the drafts between thefromdraft (inclusive) and thetodraft (exclusive) to thetodraft. It then makes all the drafts from thefromdraft (inclusive) to thetodraft (exclusive) empty. The document shell or container application can call theCollapseDraftsmethod to delete these empty drafts from this document.For this method to be successful there must be no outstanding drafts between the
fromdraft (exclusive) and thetodraft (exclusive). An outstanding draft has a reference count greater than 0, meaning that it is being used by an object.EXCEPTIONS
kODErrDraftDoesNotExist- Either the
fromdraft does not exist, thetodraft does not exist, or thefromdraft is not a later draft than thetodraft.kODErrOutstandingDraft- There are outstanding drafts between the
fromdraft (exclusive) and thetodraft (exclusive).SEE ALSO
TheODDocument::CollapseDraftsmethod (page 138).
TheODDraft::SaveToAPreviousmethod (page 183).