111,130
社区成员
发帖
与我相关
我的任务
分享
private void button1_Click(object sender, EventArgs e)
{
Word.ApplicationClass wd = new Word.ApplicationClass();
object oMissing = System.Reflection.Missing.Value;
wd.Documents.Add(ref oMissing, ref oMissing, ref oMissing, ref oMissing);
Word.Document doc = wd.ActiveDocument;
wd.Visible = false;
object extend = null;
object unit = null;
object count = 0;
object character;
extend = Word.WdMovementType.wdExtend;
unit = Word.WdUnits.wdCell;
wd.Selection.Move(ref unit, ref count);
wd.Selection.TypeText("会议通知");
//换行
wd.Selection.MoveRight(ref unit, ref count, ref extend);
count = 2;
character = Word.WdUnits.wdCharacter;
wd.Selection.Move(ref character, ref count);
wd.Selection.TypeText("eeeeeee");
}