I am complete novice on VBA but I have followed the code in the thread and the modifications to include sections and headings.
Export Comments with referred text and line numbers from Word to Excel
StrCmt = StrCmt & vbTab & .Scope.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel").Paragraphs.First.Range.ListFormat.ListString
StrCmt = StrCmt & vbTab & .Scope.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel").Paragraphs.First.Range.Text
The above works like magic, but what modification I should do to extract the Heading Level 2. i tried modifying above to lines to wdGotoHeading but it didn't work and threw error on Bookmark not found
Export Comments with referred text and line numbers from Word to Excel
StrCmt = StrCmt & vbTab & .Scope.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel").Paragraphs.First.Range.ListFormat.ListString
StrCmt = StrCmt & vbTab & .Scope.GoTo(What:=wdGoToBookmark, Name:="\HeadingLevel").Paragraphs.First.Range.Text
The above works like magic, but what modification I should do to extract the Heading Level 2. i tried modifying above to lines to wdGotoHeading but it didn't work and threw error on Bookmark not found