摘要:[.NET C# - Word] 插入符號
01 using Microsoft.Office.Interop.Word;
02
03 public class WordHelper
04 {
05 private _Document m_Document = null;
06 private _Application m_wordApplication = null;
07
08 /// <summary>
09 /// 插入符號
10 /// </summary>
11 /// <param name="strFont">字型</param>
12 /// <param name="strCharacterNumber">字元代碼</param>
13 private void InsertSymbol(string strFont, int strCharacterNumber)
14 {
15 object oFont = strFont;
16 object oUnicode = true;
17 Selection selection = this.m_wordApplication.Selection;
18 selection.InsertSymbol(strCharacterNumber, ref oFont, ref oUnicode, ref oMissing);
19 }
20 }
02
03 public class WordHelper
04 {
05 private _Document m_Document = null;
06 private _Application m_wordApplication = null;
07
08 /// <summary>
09 /// 插入符號
10 /// </summary>
11 /// <param name="strFont">字型</param>
12 /// <param name="strCharacterNumber">字元代碼</param>
13 private void InsertSymbol(string strFont, int strCharacterNumber)
14 {
15 object oFont = strFont;
16 object oUnicode = true;
17 Selection selection = this.m_wordApplication.Selection;
18 selection.InsertSymbol(strCharacterNumber, ref oFont, ref oUnicode, ref oMissing);
19 }
20 }