Problem with first line indent


#1

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:

builder.MoveToMergeField("MegerfieldItemname");
double indent = builder.ParagraphFormat.FirstLineIndent;

foreach (string Item in Items)
{
builder.ParagraphFormat.FirstLineIndent = indent;
builder.Writeln(s);
}

But it finally turns out to be:

Itemname: A. ItemA

B. ItemB

C. ItemC

It is not result I need.

Can anyone help? Thanks.


#2

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:

builder.Writeln("\tItem1");

Best regards,