Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我目前正在使用参考 Interop.Microsoft.office.interop.word 对 vb.net 项目进行增强。现在我可以打印出一个文档,并且生成的文档中几乎没有书签。有没有办法检索那些书签的页码?总之,我想知道这些书签所在的页码。
我找到了如下解决方案:
GetPageNumberOfRange(BookmarkA.Range)
Public Function GetPageNumberOfRange(ByVal range As Microsoft.Office.Interop.Word.Range) As Integer Return range.Information(Microsoft.Office.Interop.Word.WdInformation.wdActiveEndPageNumber) End Function