Hey guys,

I decided to learn VBA two weeks ago, and it's gone rather smooth. Now, however, I've encountered a problem I can't seem to solve on my own.
I've set up an excel document containing various modules. One of these modules extracts comments from a word document over to the excel document - which works as intended.

The problem is, I haven't been able to extract the first numbered header above each comment, which I'd very much like. Currently I have to do this manually after extracting the comments. As an example, I would like to also extract the header and number alongside each comment, such as '2.1.1 Title'. If the comment is highlighting the header itself, it should be that header which is extracted as well.

I've tried a variety of things based on what I could find online, but every time I'm met with a variety of bugs I can't seem to fix. I've yet to find something than even sorta works. Does anyone know how I would go about doing this?

This is the code I have for the module (Sorry if I'm not inserting this in the correct manner/format):

Formula: copy to clipboard
Please Login or Register  to view this content.


Thanks for any help you might provide