Hi again!
A few hours ago I posted the question how to read a word document with table(s) sequentially, i.e. paragraph by paragraph or whatever document object you have in that document. After that I found an example similar to my question, changed a bit and got the code below
For Each oSection In Me.coDoc.Sections
For Each oDocumentObject In oSection.Body.ChildObjects
cvChildObjectsCount = cvChildObjectsCount + 1
sDOT = oDocumentObject.GetType.ToString
Select Case sDOT
Case "Spire.Doc.Documents.Paragraph"
'do things
Case "Spire.Doc.Table"
'do things
Case Else
End Select
Next 'ChildObject
Next 'Section
This allows me to iterate through my document and get values from a paragraph or from a table. I thought I had found the solution but the walkthrough stops about a third of the way through the document. There will be no error, but both Body.ChildObjects and Sections will run out and the loops end. The rest of the document is similar to the first third so I can't see any reason why the items would run out. I am using FreeSpire.doc, is there a limitation there?
Grateful for answers