Good morning!
Having some trouble trying to figure out how to do this. My scenario is - I am taking in a word document. Within that worddocument is a placeholder keyword. I want to replace this keyword with a bulleted list. I've gotten close, but not quite. It puts everything in on its own line - but each line doesn't have a bullet. For example:
- LINE 1
LINE 2
LINE 3
LINE 4
versus the desired output
- LINE 1
- LINE 2
- LINE 3
- LINE 4
I've been trying to follow examples. But most seem to be creating things and appending them, so I'm wondering what I might be doing wrong. Any suggestions would be greatly appreaciated! :)
TextSelection[] selections = sourceDocument.FondAll(placeholderKey, false, false);
foreach (TextSelection selection in selections)
{
IWParagraph paragraph = selection.GetAsOneRange().OwnerParagraph;
...
paragraph.ListFormat.ApplyDefBulletStyle();
foreach (string item in valueList)
{
paragrapgh.ListFOrmat.ApplyDefBulletStyle();
paragraph.AppendText(item);
- paragraph.AppendBreak(BreakType.LineBreak);
paragraph.ListFormat.ContinueListNumbering();
}
sourceDocument.Replace(placeholderKey, ....)
}