tags:

views:

161

answers:

2

I am interested to get the topic headings (say all lines with Heading 1 and Heading 2) from a word document. Using VBA you can parse thru every line in that document and verify the style; however this seems to be a tedious job. I believe that there should be some easy way of doing it. Any pointers

+1  A: 

A pointer --->

tempD = ActiveDocument.GetCrossReferenceItems(wdRefTypeHeading)

gives you a list of Headings in document.

Vaibhav
This is exactly what I was looking for... thanks a lot. Regards, Nilesh
Nilesh Deshmukh
A: 

This was answered earlier, I should have searched again before submitting the question

http://stackoverflow.com/questions/274814/getting-the-headings-from-a-word-document

Just copying it here for everyone's reference

Nilesh Deshmukh

related questions