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;希望打印日期四个字是粗体的。这个怎么弄啊?
            

解决方案 »

  1.   

            WordApp.Selection.Font.Bold = 1 '字体加粗
            WordApp.ActiveWindow.ActivePane.Selection.TypeText("打印日期:")
            WordApp.Selection.Font.Bold = 0 '字体不加粗
            'WordApp.ActiveWindow.ActivePane.Selection.TypeText("2010.5.28")
            WordApp.ActiveWindow.ActivePane.Selection.TypeText(FormatDateTime(Now, DateFormat.ShortDate))
      

  2.   

            WordApp.Selection.Font.Bold = 1 '字体加粗
            WordApp.ActiveWindow.ActivePane.Selection.TypeText("打印日期:")
            WordApp.Selection.Font.Bold = 0 '字体不加粗
            'WordApp.ActiveWindow.ActivePane.Selection.TypeText("2010.5.28")
            WordApp.ActiveWindow.ActivePane.Selection.TypeText(FormatDateTime(Now, DateFormat.ShortDate))