I am after something like this:
1. Some text spread over
two lines
i) blah
ii) blah
2. Some more text
Following this thread, I was able to create indented numbered lists without too much trouble, but if the paragraph text contains any newline characters (‘\n’), I end up with something like this:
1. Some text spread over
2. two lines
i) blah
ii) blah
3. Some more text
Are multi-line numbered lists possible, and if so, what is the best way to do it?
Dear Ben,
For your help, I have written the following sample code. Its output is also attached.
C#
Presentation pres = new Presentation();
Slide sld = pres.GetSlideByPosition(1);
Shape shp = sld.Shapes.AddRectangle(100, 100, 3000, 2000);
shp.LineFormat.ShowLines = false;
TextFrame tf = shp.AddTextFrame("");
//-------------------------------------
Paragraph para = tf.Paragraphs[0];
para.BulletOffset = 0;
para.TextOffset = 200;
para.Depth = 0;
para.HasBullet = true;
para.BulletType = BulletType.Numbered;
para.Text = "Some text spread over\vtwo lines.";
//-------------------------------------
Paragraph newPara = new Paragraph(para);
newPara.BulletOffset = 200;
newPara.TextOffset = 400;
newPara.NumberedBulletStyle = NumberedBulletStyle.BulletRomanLCParenRight;
newPara.Depth = 1;
newPara.Text = "blah";
tf.Paragraphs.Add(newPara);
//-------------------------------------
newPara = new Paragraph(newPara);
newPara.Text = "blah";
tf.Paragraphs.Add(newPara);
//-------------------------------------
newPara = new Paragraph(para);
newPara.Depth = 0;
newPara.Text = "Some more text.";
tf.Paragraphs.Add(newPara);
//-------------------------------------
pres.Write("c:\\out.ppt");
Great, Thanks,
replacing ‘\n’ characters with ‘\v’ worked a treat.