Word:
Word.Selection sec = ThisAddIn.appWord.Selection;
sec.InsertAfter(value);
Excel:
Excel.Workbook wbook = Globals.ThisAddIn.Application.ActiveWorkbook; //当前活动workbook
Excel.Worksheet wsheet = (Excel.Worksheet)wbook.ActiveSheet; //当前活动sheet
Excel.Range range = wsheet.Application.ActiveCell; //当前活动的cell
value = range.Text + " " + value;
range.set_Value(Type.Missing, value);
Outlook:
Word.Document document1 = this.inspector.WordEditor;
document1.Application.Selection.InsertAfter(value);
时间: 2024-10-10 00:30:16