List Styling

I am trying to format a list within a Word document that I'm generating. The list numbers should be a 0 margin and all text should be indented. I'm using the following code:

ListStyle bulStyle = Document.AddListStyle(ListType.Numbered, "NumberedStyle");
WListLevel bulLevel1 = bulStyle.Levels[0];
bulLevel1.TextPosition = 0f;
bulLevel1.TabSpaceAfter = 20f;
bulLevel1.CharacterFormat.FontName = "Arial";
bulLevel1.CharacterFormat.FontSize = 10f;
bulLevel1.ParagraphFormat.AfterSpacing = 10f;

What I'm seeing is:

1. some text would be here and it would
wrap like this.

What I would like to do is:

1. some text would be here and it would
wrap like this

Is this possible? I tried using the built in styles and it did the same thing.

3 Replies

SP Steve Platz July 15, 2009 01:32 PM UTC

The example in the post above is wrong. All formatting was stripped. It should have been (a dash - is a space):

What I'm seeing:

1.-some-text-would-go-here-and
wrap-like-this

What I would like:

1.-some-text-would-go-here-and
---wrap-like-this


VS Vijayakumar S Syncfusion Team July 17, 2009 09:20 AM UTC

Hi Steve,

Thank you for posting your query.

Yes this is possible in Essential DocIO. We have prepared a sample, which will show how to create a list as you expected. Please look into the sample and let us know if this helps.

http://files.syncfusion.com/support/DocIO.Windows/88113.zip

Please let me know if you have any questions.

Regards,
Vijay


SP Steve Platz July 22, 2009 07:29 PM UTC

That worked. Thanks!

Loader.
Up arrow icon