Position cursor at start/end of Word document

后端 未结 9 792
误落风尘
误落风尘 2020-12-11 16:39

We are manipulating our Word 2007 documents from .Net using Word Interop. Mostly doing stuff with fields as in:

For Each f In d.Fields
    f.Select()
    //d         


        
9条回答
  •  长情又很酷
    2020-12-11 17:01

    Try this :

    int lNumberOfPages = 
      _WordDoc.ComputeStatistics(Word.WdStatistic.wdStatisticPages, false);
    
    WordApp.Selection.GoTo(Word.WdGoToItem.wdGoToPage,WordApp.WdGoToDirection.wdGoToLast, lNumberOfPages);
    

提交回复
热议问题