OK, I just figured out that this returns the document section numbers and it is correct. Is there a wd statement that returns the heading number (e.g., Section 2.1.4)?
I need help with the following vb. This is part of a macro used to take a section number from a Word 2010 doc and populate an Excel spreadsheet. When I run this, the resulting numbers do not match the actual section numbers.
For n = 1 To nCount
'comment number
.Cells(n + HeadingRow, 1).Value = n
'call function to get section heading
.Cells(n + HeadingRow, 2).Value = oDoc.Comments(n).Range.Information(wdActiveEndSectionNumber)
I need help with the following vb. This is part of a macro used to take a section number from a Word 2010 doc and populate an Excel spreadsheet. When I run this, the resulting numbers do not match the actual section numbers.
For n = 1 To nCount
'comment number
.Cells(n + HeadingRow, 1).Value = n
'call function to get section heading
.Cells(n + HeadingRow, 2).Value = oDoc.Comments(n).Range.Information(wdActiveEndSectionNumber)
Last edited: