摘要:[.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 private void SelectionGoToLineLast()
12 {
13 object oGoToItem = WdGoToItem.wdGoToPage;
14 object oGoToDirection = WdGoToDirection.wdGoToLast;
15 Selection selection = this.m_wordApplication.Selection;
16 selection.GoTo(ref oGoToItem, ref oGoToDirection, ref oMissing, ref oMissing);
17 }
18 }
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 private void SelectionGoToLineLast()
12 {
13 object oGoToItem = WdGoToItem.wdGoToPage;
14 object oGoToDirection = WdGoToDirection.wdGoToLast;
15 Selection selection = this.m_wordApplication.Selection;
16 selection.GoTo(ref oGoToItem, ref oGoToDirection, ref oMissing, ref oMissing);
17 }
18 }