Aspose for VSTO Wiki
This project provides VSTO and comparative Aspose source code examples
Brought to you by:
asposemp
Word.Application wordApp = Application;
wordApp.Documents.Open("Add Bookmark.doc");
Document extendedDocument = Globals.Factory.GetVstoObject(this.Application.ActiveDocument);
Bookmark firstParagraph = extendedDocument.Controls.AddBookmark( extendedDocument.Paragraphs[1].Range, "FirstParagraph");
Document doc = new Document(); DocumentBuilder builder = new DocumentBuilder(doc); builder.StartBookmark("MyBookmark"); builder.Writeln("Text inside a bookmark."); builder.EndBookmark("MyBookmark"); doc.Save("Adding Bookmark.doc");
Download