Converting Word Doc Into Columns 
Author Message
 Converting Word Doc Into Columns

Hello Anyone;

I hoping someone can find me a shortcut to my problem.  I have a word
document I was given with a list of some 2000 individuals with First Name,
Last Name, Address, Phone Number ect.  I want to some how extract this info
and place them in column format so that I can eventually put them into an
Access database which will make them usable.

Here is an example;

Salutation Mr. Last Name John Country of Origin Pakistan
 First Name Smith
Home Address 703 - 1405 Prince of Wales Drive Period of Sponsorship
 Beginning Date 01/09/94 Ending Date 31/08/99
 Actual Date of Completion 31/08/99
 Ottawa ON Degree Ph.D.
 K2C 3J9
 Field of Study Economics
Telephone: 613-555-9588
Fax: 613-555-9588 University Carleton

 Supervisor Prof. Brian Erard
Status: D
 Telephone:

Is the some VBA code that I could use to select for example, Salutation plus
1 tab and then a certain amount of characters and select all of these within
the document and past the results into excel.  Then proceed to do this with
Last Name, First Name ect.

Any suggestions or ideas would be very much appreciated.

Thanks

Greg Murphy
Consulting And Audit Canada
Ottawa, Ontario
Canada



Wed, 18 Jun 1902 08:00:00 GMT  
 Converting Word Doc Into Columns
Does every record have 14 lines...What if some info is missing?


Quote:
>Hello Anyone;

>I hoping someone can find me a shortcut to my problem.  I have a word
>document I was given with a list of some 2000 individuals with First Name,
>Last Name, Address, Phone Number ect.  I want to some how extract this info
>and place them in column format so that I can eventually put them into an
>Access database which will make them usable.

>Here is an example;

>Salutation Mr. Last Name John Country of Origin Pakistan
> First Name Smith
>Home Address 703 - 1405 Prince of Wales Drive Period of Sponsorship
> Beginning Date 01/09/94 Ending Date 31/08/99
> Actual Date of Completion 31/08/99
> Ottawa ON Degree Ph.D.
> K2C 3J9
> Field of Study Economics
>Telephone: 613-555-9588
>Fax: 613-555-9588 University Carleton

> Supervisor Prof. Brian Erard
>Status: D
> Telephone:

>Is the some VBA code that I could use to select for example, Salutation
plus
>1 tab and then a certain amount of characters and select all of these
within
>the document and past the results into excel.  Then proceed to do this with
>Last Name, First Name ect.

>Any suggestions or ideas would be very much appreciated.

>Thanks

>Greg Murphy
>Consulting And Audit Canada
>Ottawa, Ontario
>Canada



Wed, 18 Jun 1902 08:00:00 GMT  
 Converting Word Doc Into Columns
No every record does not always have 14 lines and yes sometimes info is
missing.  But if there is some VBA code that could run through the whole
document and first find all the "Salutations" plus a tab plus whatever (Mr,
Ms, Mrs).  There is always a tab after field name(ie, Salutation, First_Name
etc)

Salutation(Tab)Mr

Is there anyway to go through the whole document and select Salutation plus
a Tab plus say up to 10 characters.


Quote:
> Does every record have 14 lines...What if some info is missing?



> >Hello Anyone;

> >I hoping someone can find me a shortcut to my problem.  I have a word
> >document I was given with a list of some 2000 individuals with First
Name,
> >Last Name, Address, Phone Number ect.  I want to some how extract this
info
> >and place them in column format so that I can eventually put them into an
> >Access database which will make them usable.

> >Here is an example;

> >Salutation Mr. Last Name John Country of Origin Pakistan
> > First Name Smith
> >Home Address 703 - 1405 Prince of Wales Drive Period of Sponsorship
> > Beginning Date 01/09/94 Ending Date 31/08/99
> > Actual Date of Completion 31/08/99
> > Ottawa ON Degree Ph.D.
> > K2C 3J9
> > Field of Study Economics
> >Telephone: 613-555-9588
> >Fax: 613-555-9588 University Carleton

> > Supervisor Prof. Brian Erard
> >Status: D
> > Telephone:

> >Is the some VBA code that I could use to select for example, Salutation
> plus
> >1 tab and then a certain amount of characters and select all of these
> within
> >the document and past the results into excel.  Then proceed to do this
with
> >Last Name, First Name ect.

> >Any suggestions or ideas would be very much appreciated.

> >Thanks

> >Greg Murphy
> >Consulting And Audit Canada
> >Ottawa, Ontario
> >Canada



Wed, 18 Jun 1902 08:00:00 GMT  
 Converting Word Doc Into Columns
Greg,

Provided all your text fields have tabs between, select all
your data in Word, Table, Convert Text to Table, confirm
column/row structure, OK.

Now select all your data again, Edit, Copy, open your Excel
spreadsheet, Edit Paste.

Dave


| Hello Anyone;
|
| I hoping someone can find me a shortcut to my problem.  I
have a word
| document I was given with a list of some 2000 individuals
with First Name,
| Last Name, Address, Phone Number ect.  I want to some how
extract this info
| and place them in column format so that I can eventually
put them into an
| Access database which will make them usable.
|
| Here is an example;
|
| Salutation Mr. Last Name John Country of Origin Pakistan
|  First Name Smith
| Home Address 703 - 1405 Prince of Wales Drive Period of
Sponsorship
|  Beginning Date 01/09/94 Ending Date 31/08/99
|  Actual Date of Completion 31/08/99
|  Ottawa ON Degree Ph.D.
|  K2C 3J9
|  Field of Study Economics
| Telephone: 613-555-9588
| Fax: 613-555-9588 University Carleton

|  Supervisor Prof. Brian Erard
| Status: D
|  Telephone:
|
| Is the some VBA code that I could use to select for
example, Salutation plus
| 1 tab and then a certain amount of characters and select
all of these within
| the document and past the results into excel.  Then
proceed to do this with
| Last Name, First Name ect.
|
| Any suggestions or ideas would be very much appreciated.
|
| Thanks
|
| Greg Murphy
| Consulting And Audit Canada
| Ottawa, Ontario
| Canada
|
|
|



Wed, 18 Jun 1902 08:00:00 GMT  
 Converting Word Doc Into Columns

says...
Quote:
> No every record does not always have 14 lines and yes sometimes info is
> missing.  But if there is some VBA code that could run through the whole
> document and first find all the "Salutations" plus a tab plus whatever (Mr,
> Ms, Mrs).  There is always a tab after field name(ie, Salutation, First_Name
> etc)

> Salutation(Tab)Mr

> Is there anyway to go through the whole document and select Salutation plus
> a Tab plus say up to 10 characters.



> > Does every record have 14 lines...What if some info is missing?



> > >Hello Anyone;

> > >I hoping someone can find me a shortcut to my problem.  I have a word
> > >document I was given with a list of some 2000 individuals with First
> Name,
> > >Last Name, Address, Phone Number ect.  I want to some how extract this
> info
> > >and place them in column format so that I can eventually put them into an
> > >Access database which will make them usable.

> > >Here is an example;

> > >Salutation Mr. Last Name John Country of Origin Pakistan
> > > First Name Smith
> > >Home Address 703 - 1405 Prince of Wales Drive Period of Sponsorship
> > > Beginning Date 01/09/94 Ending Date 31/08/99
> > > Actual Date of Completion 31/08/99
> > > Ottawa ON Degree Ph.D.
> > > K2C 3J9
> > > Field of Study Economics
> > >Telephone: 613-555-9588
> > >Fax: 613-555-9588 University Carleton

> > > Supervisor Prof. Brian Erard
> > >Status: D
> > > Telephone:

> > >Is the some VBA code that I could use to select for example, Salutation
> > plus
> > >1 tab and then a certain amount of characters and select all of these
> > within
> > >the document and past the results into excel.  Then proceed to do this
> with
> > >Last Name, First Name ect.

> > >Any suggestions or ideas would be very much appreciated.

> > >Thanks

> > >Greg Murphy
> > >Consulting And Audit Canada
> > >Ottawa, Ontario
> > >Canada

You are using the wrong approach for this kind of problem.  The lack of
information will make it very difficult to do any kind of direct import
into a spreadsheet or database, because those programs select fields
based on physical or sequential position, which are not consistent here.

What you need to do is to convert each field into a separate record,
generating a common case ID for each individual and with the field name
as an identifier, then do an insert/merge to combine the records for each
case into a single flat file record that can be imported into a database.

I don't know enough VBA to know if this is directly possible with Office
components, but I have done this kind of thing with a combination of text
tools and various types of proprietary software.

--
Jan Werner



Wed, 18 Jun 1902 08:00:00 GMT  
 
 [ 5 post ] 

 Relevant Pages 

1. Help - How to convert Word 97 doc file to Word 7.0 doc file

2. Help - How to convert Word 97 doc file to Word 7.0 doc file

3. Converting Addresses in Word doc to Excel Columns

4. Converting a list of Addresses in Word doc to Excel columns

5. How do I convert Publisher doc to Word doc

6. How to convert Word doc into Excel doc

7. converting Quark Express doc to Word doc

8. Converting Mac doc to Word 97 doc?

9. Converting Word Perfect doc to Microsolf Word 2000

10. Word doesn't launch after trying to convert an html file to a word doc


 
Powered by phpBB® Forum Software © phpBB Group