StoryType

StoryType enumeration

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

public enum StoryType

Values

NameValueDescription
None0Default value. There is no such story in the document.
MainText1Contains the main text of the document, represented by Body.
Footnotes2Contains footnote text, represented by Footnote.
Endnotes3Contains endnotes text, represented by Footnote.
Comments4Contains document comments (annotations), represented by Comment.
Textbox5Contains shape or textbox text, represented by Shape.
EvenPagesHeader6Contains text of the even pages header, represented by HeaderFooter.
PrimaryHeader7Contains text of the primary header. When header is different for odd and even pages, contains text of the odd pages header. Represented by HeaderFooter.
EvenPagesFooter8Contains text of the even pages footer, represented by HeaderFooter.
PrimaryFooter9Contains text of the primary footer. When footer is different for odd and even pages, contains text of the odd pages footer. Represented by HeaderFooter.
FirstPageHeader10Contains text of the first page header, represented by HeaderFooter.
FirstPageFooter11Contains text of the first page footer, represented by HeaderFooter.
FootnoteSeparator12Contains the text of the footnote separator.
FootnoteContinuationSeparator13Contains the text of the footnote continuation separator.
FootnoteContinuationNotice14Contains the text of the footnote continuation notice separator.
EndnoteSeparator15Contains the text of the endnote separator.
EndnoteContinuationSeparator16Contains the text of the endnote continuation separator.
EndnoteContinuationNotice17Contains the text of the endnote continuation notice separator.

Examples

Shows how to remove all shapes from a node.

Document doc = new Document();
DocumentBuilder builder = new 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.InsertShape(ShapeType.Cube, 100.0, 100.0);

Assert.AreEqual(1, doc.GetChildNodes(NodeType.Shape, true).Count);

// We can delete all shapes from the child paragraphs of this Body.
Assert.AreEqual(StoryType.MainText, doc.FirstSection.Body.StoryType);
doc.FirstSection.Body.DeleteShapes();

Assert.AreEqual(0, doc.GetChildNodes(NodeType.Shape, true).Count);

See Also