revisions_view property
Document.revisions_view property
Gets or sets a value indicating whether to work with the original or revised version of a document.
@property
def revisions_view(self) -> aspose.words.RevisionsView:
...
@revisions_view.setter
def revisions_view(self, value: aspose.words.RevisionsView):
...
Remarks
The default value is ****.
Examples
Shows how to switch between the revised and the original view of a document.
doc = aw.Document(file_name=MY_DIR + 'Revisions at list levels.docx')
doc.update_list_labels()
paragraphs = doc.first_section.body.paragraphs
self.assertEqual('1.', paragraphs[0].list_label.label_string)
self.assertEqual('a.', paragraphs[1].list_label.label_string)
self.assertEqual('', paragraphs[2].list_label.label_string)
# View the document object as if all the revisions are accepted. Currently supports list labels.
doc.revisions_view = aw.RevisionsView.FINAL
self.assertEqual('', paragraphs[0].list_label.label_string)
self.assertEqual('1.', paragraphs[1].list_label.label_string)
self.assertEqual('a.', paragraphs[2].list_label.label_string)
See Also
- module aspose.words
- class Document