我正在尝试简单地将一些文本从 c# 程序输出到新的 Word 文档,但我有一个奇怪的问题:我的很多输出都颠倒了。任何不以字母结尾的单词都会跳到句子的末尾。例如:
DocX doc= DocX.Create(filePath);
Paragraph p1 = template.InsertParagraph();
p1.AppendLine("This line contains a ").Append("bold").Bold().Append(" word.");
p1.AppendLine("Here is example with question mark?");
p1.AppendLine();
p1.AppendLine("Can you help me figure it out?");
p1.AppendLine();
代码输出:
如您所见,以非字母结尾的句子被混淆了。我正在使用 2010 Office Word