extracting strings from Word files

chaz_mac

Board Regular
Joined
Mar 9, 2007
Messages
76
Using Word 2003 sp3
Excel 2003 sp3

Creating an Excel spread sheet as an index to Word documents.

first column is a hyperlink to the document, no problem getting this.

in later columns i wish to interrogate the document for subject, sent to, and date, just to fill those in.

i tried searching the binary word document file, but there are multiple repeats of phrases such as "Subject :" in random places that prevent a succesful logical search for string values that are essentially random.

In the word document as it appears in Word, the date is stored in the header, in a fixed location (last data item). the body always looks like:

To : Fan Noise Participants
File

From : Me

Subject : Outdoor Fan Testing at San Diego

there cam be multiple To: lines, i just want the first one, the subect (possibly multi-line, but a single phrase with one period).

is there a way from Excel macro land to get this information from Word, instead of having to open the Word document and copy-paste it in? because i always manage to do something wrong at least once when i do these things.

Thanks -

Chaz
 

Excel Facts

What do {} around a formula in the formula bar mean?
{Formula} means the formula was entered using Ctrl+Shift+Enter signifying an old-style array formula.

Forum statistics

Threads
1,191,092
Messages
5,984,629
Members
439,896
Latest member
SquareCare

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top