Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations wOOdy-Soft on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Import Header from a Word doc to excel

Status
Not open for further replies.

arryb

Programmer
Oct 27, 2003
27
GB
I am currently importing an rtf file to excel from word using the copy all and paste option. This is fine except for the fact the the Header is not copied. I need to be able to grab certain text from the header to declare as a string within my excel spreadsheet.

In there an easy way to automate this procedure using VBA.

All help appreciated.

Thanks

Arry
 
arryb,

I am not a Word VBA guru, but here's some code that might get you started...
Code:
    For Each s In ActiveDocument.Sections
        For Each hd In s.Headers
            MsgBox hd.Range.Text
        Next
    Next
:)

Skip,
Skip@TheOfficeExperts.com
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top