Problem with first line indent


I want to achieve a following format in a word document.

Itemname: A. ItemA

B. ItemB

C. ItemC

So, I put a template:

Itemname: <>

with the following code:

double indent = builder.ParagraphFormat.FirstLineIndent;

foreach (string Item in Items)
builder.ParagraphFormat.FirstLineIndent = indent;

But it finally turns out to be:

Itemname: A. ItemA

B. ItemB

C. ItemC

It is not result I need.

Can anyone help? Thanks.


I don't see how using FirstLineIndent can help you in this matter.

The paragraph where you are taking FirstLineIndent value from begins with "Itemname:" and is not indented as far as I can see. You can use tabs as one of the ways to achieve the desired formatting:


Best regards,