Highlight paragraph in Word document

Technical support for Spire.Doc

Moderator: iceblue support

Highlight paragraph in Word document

Postby linda.masha » Wed Feb 09, 2011 3:16 am

Hi experts,

I want to embed paragraph shading in my word document by using your Spire.Doc for .NET. Can you give me VB.NET demo code?

Thanks
:P
linda.masha
 
Posts: 5
Joined: Thu Dec 23, 2010 1:17 am

Re: Highlight paragraph in Word document

Postby iceblue support » Wed Feb 09, 2011 9:17 am

Hi Linda,

use the code below to have a try:

Dim document As New Document()
Dim section As Section = document.AddSection()
Dim p2 As Paragraph = section.AddParagraph()
p2.AppendText("fdsdfsdsffdsdsfsdgfda")
p2.Format.BackColor = Color.Blue

document.SaveToFile("Sample.doc")
System.Diagnostics.Process.Start("Sample.doc")

:P
e-iceblue support
User avatar
iceblue support
 
Posts: 244
Joined: Tue Dec 21, 2010 2:56 am


Return to Spire.Doc

Who is online

Users browsing this forum: No registered users and 0 guests