Dim objWord As New Microsoft.Office.Interop.Word.Application
objWord.Selection.GoTo(What:=-1, Name:="Ch2")
objWord.Selection.HomeKey(Unit:=5)
objWord.Selection.MoveDown(Unit:=5, Count:=1)
objWord.Selection.EndKey(Unit:=5, Extend:=1)
objWord.Selection.MoveLeft(Unit:=1, Count:=1, Extend:=1)
arrChapter(0) = Replace(objWord.Selection.Text, vbTab, " ")
chapter2PageNumber = objWord.Selection.Information(3)
Is this possible?
Hi Jørn,
Thanks for your inquiry. Please note that Aspose.Words is quite
different from the Microsoft Word’s Object Model in that it represents
the document as a tree of objects more like an XML DOM tree. If
you worked with any XML DOM library you will find it is easy to
understand and work with Aspose.Words. When you load a Word document
into Aspose.Words, it builds its DOM and all document elements and
formatting are simply loaded into memory. Please read the following
articles for more information on DOM:
I suggest you please read about DocumentBuilder and moving cursor in the document from here:
http://www.aspose.com/docs/display/wordsnet/DocumentBuilder+Overview
Hope this helps you. Please let us know if you have any more queries.
Dim inputDoc As New Aspose.Words.Document(path)
inputDoc.Range.Bookmarks <- This only contain the first bookmark. I can guarantee that there is six bookmarks in the file.
Hi Jørn,
Thanks for your inquiry. Perhaps, you are using Aspose.Words without license. Please note that in evaluation mode there
are some limitations applied. E.g Aspose.Words injects an evaluation watermark at the top of the document. The document’s content are truncated after a certain number of paragraphs during import or export.
Please read the following documentation link about applying license.
http://www.aspose.com/docs/display/wordsnet/Applying+a+License
If you still face problem, please share your input Word document and code here for testing purposes. I will investigate the issue on my side and provide you more information.