[.NET C# - Word] 按下 Backspace

摘要:[.NET C# - Word] 按下 Backspace

 

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     /// 按下Backspace
10     /// </summary>
11     /// <param name="intCount">次數</param>

12     private void SelectionTypeBackspace(int intCount)
13     {
14         Selection selection = this.m_wordApplication.Selection;
15         for (int i = 0; i < intCount; i++)
16         {
17             selection.TypeBackspace();
18         }

19     }

20 }