Spire.Doc is a professional Word .NET library specifically designed for developers to create, read, write, convert and print Word document files from any .NET platform (C#, VB.NET, ASP.NET, .NET Core) and Java applications (J2SE and J2EE) with fast and high quality performance.

Fri May 31, 2013 5:03 pm

Hi,

Is there a way to use tabs for spacing formatting a document.

I am creating a document on the fly. space and alignment has to be done per line of text. Is there a way to set tabs or use tabs when inserting text?

Example:
Code: Select all
[color=#0040FF]Dim headerParagraph As Documents.Paragraph = Nothing
        If body.Paragraphs.Count > 0 Then
            headerParagraph = body.Paragraphs(0)
        Else
            headerParagraph = body.AddParagraph()
        End If

headerParagraph.AppendText("Order Date" & vbTab & vbTab & ": " & dr.CREATE_DTTIME & vbTab & vbTab & vbTab & "Phone" & vbTab & ": " & strFormattedPhone & vbCrLf).CharacterFormat.Font = myFont [/color]


Thanks,
Sophia

skelsey
 
Posts: 10
Joined: Mon May 06, 2013 1:54 pm

Mon Jun 03, 2013 8:57 am

Hello Sophia,

Thanks for your inquiry.

We tested the code you provided, the "vbTab" works fine. Sorry that we couldn't understand what you want to do, please provide us the complete demo to describes what you expect.

Thanks,
Gary
E-iceblule support team
User avatar

Gary.zhang
 
Posts: 1380
Joined: Thu Apr 04, 2013 1:30 am

Tue Jun 04, 2013 9:17 am

Dear Sophia,

Has this issue been resolved? If not, please provide us a template document which you want to get. And then we will provide you a demo to help you implement it.

Thanks & Regards,
Amy
E-iceblue support team
User avatar

amy.zhao
 
Posts: 2328
Joined: Wed Jun 27, 2012 8:50 am

Return to Spire.Doc