StoryType enumeration

StoryType enumeration

Text of a Word document is stored in stories. StoryType identifies a story.

Members

NameDescription
NONEDefault value. There is no such story in the document.
MAIN_TEXTContains the main text of the document, represented by Body.
FOOTNOTESContains footnote text, represented by Footnote.
ENDNOTESContains endnotes text, represented by Footnote.
COMMENTSContains document comments (annotations), represented by Comment.
TEXTBOXContains shape or textbox text, represented by Shape.
EVEN_PAGES_HEADERContains text of the even pages header, represented by HeaderFooter.
PRIMARY_HEADERContains text of the primary header. When header is different for odd and even pages, contains text of the odd pages header. Represented by HeaderFooter.
EVEN_PAGES_FOOTERContains text of the even pages footer, represented by HeaderFooter.
PRIMARY_FOOTERContains text of the primary footer. When footer is different for odd and even pages, contains text of the odd pages footer. Represented by HeaderFooter.
FIRST_PAGE_HEADERContains text of the first page header, represented by HeaderFooter.
FIRST_PAGE_FOOTERContains text of the first page footer, represented by HeaderFooter.
FOOTNOTE_SEPARATORContains the text of the footnote separator.
FOOTNOTE_CONTINUATION_SEPARATORContains the text of the footnote continuation separator.
FOOTNOTE_CONTINUATION_NOTICEContains the text of the footnote continuation notice separator.
ENDNOTE_SEPARATORContains the text of the endnote separator.
ENDNOTE_CONTINUATION_SEPARATORContains the text of the endnote continuation separator.
ENDNOTE_CONTINUATION_NOTICEContains the text of the endnote continuation notice separator.

Examples

Shows how to remove all shapes from a node.

doc = aw.Document()
builder = aw.DocumentBuilder(doc)

# Use a DocumentBuilder to insert a shape. This is an inline shape,
# which has a parent Paragraph, which is a child node of the first section's Body.
builder.insert_shape(aw.drawing.ShapeType.CUBE, 100.0, 100.0)

self.assertEqual(1, doc.get_child_nodes(aw.NodeType.SHAPE, True).count)

# We can delete all shapes from the child paragraphs of this Body.
self.assertEqual(aw.StoryType.MAIN_TEXT, doc.first_section.body.story_type)
doc.first_section.body.delete_shapes()

self.assertEqual(0, doc.get_child_nodes(aw.NodeType.SHAPE, True).count)

See Also