Thread ID: |
Created: |
Updated: |
Platform: |
Replies: |
143954 | Apr 11,2019 01:14 PM UTC | Apr 15,2019 10:09 AM UTC | WinForms | 3 |
![]() |
Tags: DocIO |
Dim a As WordDocument = New WordDocument("Sample.docx", FormatType.Doc)
Dim bknav As BookmarksNavigator = New BookmarksNavigator(a)
bknav.MoveToBookmark("casa")
Dim d As WordDocument = New WordDocument
Dim tbp As TextBodyPart = New TextBodyPart(d)
Dim para As WParagraph = d.CreateParagraph
'Append text into the paragraph.
Dim textRange As IWTextRange = para.AppendText("paragraph of element")
'Set character format for text.
textRange.CharacterFormat.Bold = True
'Apply paragraph format for the paragraph.
para.ParagraphFormat.HorizontalAlignment = HorizontalAlignment.Center
tbp.BodyItems.Add(para)
bknav.ReplaceBookmarkContent(tbp)
d.Close()
tbp.Close()
a.Save("Result.docx") |
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.