BoldSignA modern eSignature application with affordable pricing. Sign up today for unlimited document usage!
Imports Syncfusion.DocIO
Imports Syncfusion.DocIO.DLS
Public Class Form1
Private colWidths() As Integer = {50, 28, 36, 36, 144, 27, 27, 36, 64, 36, 80}
Private Sub Button1_Click(sender As Object, e As EventArgs) Handles Button1.Click
Dim doc As New WordDocument
Dim section As WSection = doc.AddSection
Dim paragraph As WParagraph = section.AddParagraph
Dim myStyle As IWParagraphStyle = CType(doc.AddParagraphStyle("myStyle"), IWParagraphStyle)
myStyle.CharacterFormat.FontName = "Tahoma"
myStyle.CharacterFormat.FontSize = 8
myStyle.CharacterFormat.Bold = True
Dim tabStop As Integer = 0
For i As Integer = 0 To colWidths.Length - 2
tabStop += colWidths(i)
paragraph.ParagraphFormat.Tabs.AddTab(tabStop)
Next
paragraph.ApplyStyle("myStyle")
paragraph.Text = "It's crackers to slip a rozzer the dropsy in snide."
Dim fn As String = Application.StartupPath & "\Test.docx"
doc.Save(fn, FormatType.Word2010)
MessageBox.Show("File created in Word 2010 format: " & fn, "File Created", MessageBoxButtons.OK, MessageBoxIcon.Information)
End Sub
End Class
Jim Brower
Hi James,
Thank you for your update.
We will update the proper way to use Paragraph Style and character format of TextRange in our documentation and will let you know once it has been published online.
Regards,
Arumuga Perumal S.