C#生成word如何设置整篇文档的字体
C#生成word如何设置整篇文档的字体,大小,谁知到用具体用的是那个属性请告知,哪位朋友有C#生成word的相关帮助的下载地址也请给我发一个,不胜感激!
多谢! --------------------编程问答-------------------- 可以参考msdn如何:在文档中设置文本格式
private void RangeFormat()--------------------编程问答-------------------- 另外,整篇文档是Document.Content
{
// Set the Range to the first paragraph.
Word.Range rng = this.Paragraphs[1].Range;
// Change the formatting.
rng.Font.Size = 14;
rng.Font.Name = "Arial";
rng.ParagraphFormat.Alignment = Word.WdParagraphAlignment.wdAlignParagraphCenter;
rng.Select();
MessageBox.Show("Formatted Range");
// Undo the three previous actions.
object numTimes3 = 3;
this.Undo(ref numTimes3);
rng.Select();
MessageBox.Show("Undo 3 actions");
// Apply the Normal Indent style.
object indentStyle = "Normal Indent";
rng.set_Style(ref indentStyle);
rng.Select();
MessageBox.Show("Normal Indent style applied");
// Undo a single action.
object numTimes1 = 1;
this.Undo(ref numTimes1);
rng.Select();
MessageBox.Show("Undo 1 action");
}
…… --------------------编程问答-------------------- 多谢回答!!!!!!!!!
补充:.NET技术 , C#