Syncfusion.DocIO.Base
Members  Example 


Syncfusion.DocIO.DLS Namespace : TextBodyPart Class

TextBodyPart Class

Represents the part of the text body items.
Object Model
TextBodyPart ClassBodyItemCollection Class
Syntax
'Declaration
 
Public Class TextBodyPart 
'Usage
 
Dim instance As TextBodyPart
public class TextBodyPart 
Example
WordDocument document = new WordDocument("Bookmarks.docx", FormatType.Docx);
//Create the bookmark navigator instance to access the bookmark
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
//Move the virtual cursor to the before the end location of the bookmark "Northwind"
bookmarkNavigator.MoveToBookmark("Northwind");
//Get the bookmark content as a text body part.
TextBodyPart part = bookmarkNavigator.GetBookmarkContent();            
//Convert the textbody part as a separate Word document.
WordDocument new_document = part.GetAsWordDocument();
//Save and close the document
new_document.Save("Sample.docx", FormatType.Docx);
document.Close();
Dim document As New WordDocument("Bookmarks.docx", FormatType.Docx)
'Create the bookmark navigator instance to access the bookmark
Dim bookmarkNavigator As New BookmarksNavigator(document)
'Move the virtual cursor to the before the end location of the bookmark "Northwind"
bookmarkNavigator.MoveToBookmark("Northwind")
'Get the bookmark content as a text body part.
Dim part As TextBodyPart = bookmarkNavigator.GetBookmarkContent()
'Convert the textbody part as a separate Word document.
Dim new_document As WordDocument = part.GetAsWordDocument()
'Save and close the document
new_document.Save("Sample.docx", FormatType.Docx)
document.Close()
Inheritance Hierarchy

System.Object
   Syncfusion.DocIO.DLS.TextBodyPart

AssemblyVersion

Syncfusion.DocIO.Base: 17.1460.0.47

See Also