Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
142042 | Jan 16,2019 10:48 AM UTC | Jan 22,2019 10:47 AM UTC | WinForms | 7 |
![]() |
Tags: DocIO |
WordDocument document = new WordDocument(@"testTab.docx", FormatType.Docx);
//Creates the bookmark navigator instance to access the bookmark
BookmarksNavigator bookmarkNavigator = new BookmarksNavigator(document);
//Moves the virtual cursor to the location before the end of the bookmark "Col1"
bookmarkNavigator.MoveToBookmark("Col1");
//Replaces the bookmark content
bookmarkNavigator.ReplaceBookmarkContent("Column 1",true);
//Moves the virtual cursor to the location before the end of the bookmark "Col2"
bookmarkNavigator.MoveToBookmark("Col2");
//Replaces the bookmark content
bookmarkNavigator.ReplaceBookmarkContent("Column 2", true);
document.Save("Sample.docx", FormatType.Docx);
document.Close(); |
This post will be permanently deleted. Are you sure you want to continue?
Sorry, An error occured while processing your request. Please try again later.
This page will automatically be redirected to the sign-in page in 10 seconds.