appWord.ActiveWindow.View.Type = WdViewType.wdOutlineView;
appWord.ActiveWindow.View.SeekView = WdSeekView.wdSeekCurrentPageFooter;
appWord.ActiveWindow.ActivePane.Selection.InsertAfter("打印日期:2010.5.28");
appWord.Selection.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphCenter; // 设置右对齐
appWord.ActiveWindow.View.SeekView = WdSeekView.wdSeekMainDocument;希望打印日期四个字是粗体的。这个怎么弄啊?
appWord.ActiveWindow.View.SeekView = WdSeekView.wdSeekCurrentPageFooter;
appWord.ActiveWindow.ActivePane.Selection.InsertAfter("打印日期:2010.5.28");
appWord.Selection.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphCenter; // 设置右对齐
appWord.ActiveWindow.View.SeekView = WdSeekView.wdSeekMainDocument;希望打印日期四个字是粗体的。这个怎么弄啊?
private void button1_Click(object sender, EventArgs e)
{
object oMissing = System.Reflection.Missing.Value;
Word._Application oWord;
Word._Document oDoc;
oWord = new Word.Application();
oWord.Visible = true;
object fileName = @"C:\doc1.doc";
oDoc = oWord.Documents.Open(ref fileName,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing,
ref oMissing, ref oMissing, ref oMissing, ref oMissing, ref oMissing); oWord.ActiveWindow.View.Type = WdViewType.wdOutlineView;
oWord.ActiveWindow.View.SeekView = WdSeekView.wdSeekCurrentPageFooter;
oWord.ActiveWindow.ActivePane.Selection.Font.Bold = 1; oWord.ActiveWindow.ActivePane.Selection.InsertAfter("打印日期:2010.5.28");
oWord.Selection.ParagraphFormat.Alignment = Microsoft.Office.Interop.Word.WdParagraphAlignment.wdAlignParagraphCenter; // 设置右对齐
oWord.ActiveWindow.View.SeekView = WdSeekView.wdSeekMainDocument;
}