Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Extacting data from word document

Geek News

Extacting data from word document
agarwalsau <agarwalsau.9ee265[ at ]officefrustration.com> 5/27/2007 6:52:40 AM
I am using MS word 2007. I write a huge number of letters with different reference No. and subjects (these fields are in text format). I would like to extract this data from every document saved on the computer and make a database of it in access or excel or even word, which ever is simple and possible. How do I go about it? It is like the opposite of mail merge! -- agarwalsau
Re: Extacting data from word document
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 5/27/2007 7:24:11 AM
How and where exactly is this information stored in the documents? Is it
always in the same place? How can it be identified?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

agarwalsau wrote:
[Quoted Text]
> I am using MS word 2007. I write a huge number of letters with
> different reference No. and subjects (these fields are in text
> format). I would like to extract this data from every document saved
> on the computer and make a database of it in access or excel or even
> word, which ever is simple and possible. How do I go about it? It is
> like the opposite of mail merge!


Re: Extacting data from word document
agarwalsau <agarwalsau.a2f304[ at ]officefrustration.com> 5/30/2007 7:51:23 AM
Graham Mayor;2170443 Wrote: > How and where exactly is this information stored in the documents? Is it >
[Quoted Text]
> always in the same place? How can it be identified?
>
> --
>
> Graham Mayor - Word MVP
>
> My web site www.gmayor.com
> Word MVP web site http://word.mvps.org
>
>
> agarwalsau wrote:-
> I am using MS word 2007. I write a huge number of letters with
> different reference No. and subjects (these fields are in text
> format). I would like to extract this data from every document saved
> on the computer and make a database of it in access or excel or even
> word, which ever is simple and possible. How do I go about it? It is
> like the opposite of mail merge! -

Yes all documents are on the same template with a reference line as the first line at the top and a subject line after the address line in the template starting with the word subject -- agarwalsau
Re: Extacting data from word document
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 5/30/2007 9:49:52 AM
The reference that you want to extract is the very first line of the
document?
Then there is an address? How many lines does the address take?
Then there is a subject that you want to store?
Can you mail me a sample document to the link on my web site home page and
tell me *exactly* what you want to store?

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>


agarwalsau wrote:
[Quoted Text]
> Graham Mayor;2170443 Wrote:
>> How and where exactly is this information stored in the documents?
>> Is it
>>
>> always in the same place? How can it be identified?
>>
>> --
>>
>> Graham Mayor - Word MVP
>>
>> My web site www.gmayor.com
>> Word MVP web site http://word.mvps.org
>>
>>
>> agarwalsau wrote:-
>> I am using MS word 2007. I write a huge number of letters with
>> different reference No. and subjects (these fields are in text
>> format). I would like to extract this data from every document saved
>> on the computer and make a database of it in access or excel or even
>> word, which ever is simple and possible. How do I go about it? It is
>> like the opposite of mail merge! -
>
> Yes all documents are on the same template with a reference line as
> the first line at the top and a subject line after the address line
> in the template starting with the word subject


Re: Extacting data from word document
agarwalsau <agarwalsau.a579e5[ at ]officefrustration.com> 6/1/2007 5:57:55 AM
Graham Mayor;2174658 Wrote: > The reference that you want to extract is the very first line of the > document? > Then there is an address? How many lines does the address take? > Then there is a subject that you want to store? > Can you mail me a sample document to the link on my web site home page > and > tell me *exactly* what you want to store? > > -- > > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org > > > > agarwalsau wrote:- > Graham Mayor;2170443 Wrote:- > How and where exactly is this information stored in the documents? > Is it > > always in the same place? How can it be identified? > > -- > > Graham Mayor - Word MVP > > My web site www.gmayor.com > Word MVP web site http://word.mvps.org > > > agarwalsau wrote:- > I am using MS word 2007. I write a huge number of letters with > different reference No. and subjects (these fields are in text > format). I would like to extract this data from every document saved > on the computer and make a database of it in access or excel or even > word, which ever is simple and possible. How do I go about it? It is > like the opposite of mail merge! -- > > Yes all documents are on the same template with a reference line as > the first line at the top and a subject line after the address line > in the template starting with the word subject - Thanx for the macro. It works perfectly, but had to fine tune it according to my requirement, as after running the macro i realized that some doc didin't have either the reference or the subject. Secondly the subject line sometimes started with "sub:", Also there were times when body of the letter had the word "subject" or the reference to the reference no of another letter . But fixing the macro to take care of all that was easy once you have the basic framework. Permit me to post the macro on the forum as i know it would be very useful in huge number of other applications. One of them I have realized is:- that now i can get/extract a mailing list from all my letters itself. Thanx once again -- agarwalsau
Re: Extacting data from word document
"Graham Mayor" <gmayor[ at ]REMOVETHISmvps.org> 6/1/2007 8:34:36 AM
I did ask if all the documents were the same ;)

I'll post the basic code on my web site for future reference.

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>

[Quoted Text]
>> Yes all documents are on the same template with a reference line as
>> the first line at the top and a subject line after the address line
>> in the template starting with the word subject -
>
> Thanx for the macro. It works perfectly, but had to fine tune it
> according to my requirement, as after running the macro i realized
> that some doc didin't have either the reference or the subject.
> Secondly the subject line sometimes
> started with "sub:", Also there were times when body of the letter had
> the word "subject" or the reference to the reference no of another
> letter . But fixing the macro to take care of all that was easy once
> you have the basic framework. Permit me to post the macro on the forum
> as i know it would be very useful in huge number of other
> applications. One of them I have realized is:- that now i can
> get/extract a mailing list from all my letters itself.
> Thanx once again



Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net