I'd like to understand why this question
Extract Heading from Word to Excel
Has been closed as a duplicate, linking to transfer data from word to excel via vba
The OP in the closed question is specifically asking about how to get a Word heading level preceding a specific range (Comment). This is not the topic of the supposed duplicate. It's not mentioned and not one of the answers goes into it.
IMO the question should not have been closed.
Edit: It's been re-opened. Thanks to all who read the thread and gave the topic due consideration!