【发布时间】:2016-10-13 09:37:15
【问题描述】:
如何并排放置 2 个项目,例如一个复选框和一个标签,而不在 Interop Word 中创建新行?
这是我正在使用的代码。这是一个新行,因为我将每个项目放在一个段落中。怎么做到一行?
//CheckBox
Word.Paragraph checkBoxparagraph = document.Paragraphs.Add(ref missing);
Word.ContentControl checkbox = checkBoxparagraph.Range.ContentControls.Add(Word.WdContentControlType.wdContentControlCheckBox);
checkBoxparagraph.Range.InsertParagraphBefore();
//Label
Word.Paragraph label = document.Paragraphs.Add(ref missing);
label.Range.Text = "Checkbox Label";
label.Range.InsertParagraphAfter();
这是代码的输出:
【问题讨论】:
标签: c# interop office-interop com-interop