Does Aspose.Word support these Word functions?

Dear Sirs,
before we will buy Aspose.Word we need to know if it is able to replace these Word functions:

  1. Get the current page number of a given position within a document:
Dim oRng as Word.Range = oDoc.Bookmarks.Item("F1").Range
Dim lastPage as Integer = CInt(oRng.Information(Word.WdInformation.wdActiveEndPageNumber))
  1. Get the position of a bookmark relative to a page:
Dim vertical As Single = Bookmark1.Information(Word.WdInformation.wdVerticalPositionRelativeToPage)
Dim horizontal As Single = Bookmark1.Information(Word.WdInformation.wdHorizontalPositionRelativeToPage)

Many thanks in advance!
Best Regards
Bodo

Hi Bodo,

Thanks for your interest in Aspose.Words.

  1. Yes, you will be able to find out on which page a particular document node (e.g. run, paragraph or table cell) is located by using the GetStartPageIndex, GetEndPageIndex and GetNumPagesSpanned methods.

  2. You can achieve this by using the following code:

Dim doc As New Document("C:\Temp\input.docx")
Dim collector As LayoutCollector = New LayoutCollector(doc)
Dim enumerator As LayoutEnumerator = New LayoutEnumerator(doc)
Dim bookmark As Bookmark = doc.Range.Bookmarks("bm1")
enumerator.Current = collector.GetEntity(bookmark.BookmarkStart)
Console.WriteLine(enumerator.Rectangle.Left)
Console.WriteLine(enumerator.Rectangle.Top)

Please let me know if I can be of any further assistance.

Best regards,