五、字体格式设定
-
- WApp.Selection.Font.NameFarEast = "华文中宋";
- WApp.Selection.Font.NameAscii = "Times New Roman";
- WApp.Selection.Font.NameOther = "Times New Roman";
- WApp.Selection.Font.Name = "宋体";
- WApp.Selection.Font.Size = float.Parse("14");
- WApp.Selection.Font.Bold = 0;
- WApp.Selection.Font.Italic = 0;
- WApp.Selection.Font.Underline = Microsoft.Office.Interop.Word.WdUnderline.wdUnderlineNone;
- WApp.Selection.Font.UnderlineColor = Microsoft.Office.Interop.Word.WdColor.wdColorAutomatic;
- WApp.Selection.Font.StrikeThrough =0;
- WApp.Selection.Font.DoubleStrikeThrough = 0;
- WApp.Selection.Font.Outline =0;
- WApp.Selection.Font.Emboss = 0;
- WApp.Selection.Font.Shadow = 0;
- WApp.Selection.Font.Hidden = 0;
- WApp.Selection.Font.SmallCaps = 0;
- WApp.Selection.Font.AllCaps = 0;
- WApp.Selection.Font.Color = Microsoft.Office.Interop.Word.WdColor.wdColorAutomatic;
- WApp.Selection.Font.Engrave = 0;
- WApp.Selection.Font.Superscript = 0;
- WApp.Selection.Font.Subscript = 0;
- WApp.Selection.Font.Spacing = float.Parse("0");
- WApp.Selection.Font.Scaling = 100;
- WApp.Selection.Font.Position = 0;
- WApp.Selection.Font.Kerning = float.Parse("1");
- WApp.Selection.Font.Animation = Microsoft.Office.Interop.Word.WdAnimation.wdAnimationNone;
- WApp.Selection.Font.DisableCharacterSpaceGrid =false;
- WApp.Selection.Font.EmphasisMark = Microsoft.Office.Interop.Word.WdEmphasisMark.wdEmphasisMarkNone;
六、终于找到了获取光标位置的东东。那里找到的忘了,感谢提供的老大。放到这里供大家参考。
有了这个和上面内容,相信大家对word文档的控制应该到了随心所欲的地步,爽啊。
获取的c#语法
-
- Selection.get_Information(WdInformation.wdActiveEndPageNumber)
这篇本来想写点dosframer的内容和word2003的一些格式,插入方面的内容,但总感到很凌乱.怕写不好
想来想去,要转gis方面了.以后不知道什么时候有时间写office方面的.
所以这里把关于word2003在c#下编程最后点内容献给大家,不足之处,日后增补.
阅读(1730) | 评论(0) | 转发(0) |