A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Word » Tables
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Convert multiple lines of text record into table



 
 
Thread Tools Display Modes
  #1  
Old February 1st, 2008, 07:09 PM posted to microsoft.public.word.tables
[email protected]
external usenet poster
 
Posts: 2
Default Convert multiple lines of text record into table

2-1-08

Hi,

I received a WORD 2003 document consisting of 500 + names, address and phone
numbers typed as:

First MI Last → Home: 213-456-7890 (return)
123 Main St → Work: 213-789-0456 (return)
City, ST ZIP → Email: me@mydomain ¶


How do I parse the three lines of information into one line per record in
the following format:

First MI Last Street Address City ST ZIP Home # Work # Email

so I can convert the text to a table and then into a usable data file.


Thanks so much for your help.

Joanne

  #2  
Old February 1st, 2008, 07:40 PM posted to microsoft.public.word.tables
Jay Freedman
external usenet poster
 
Posts: 9,488
Default Convert multiple lines of text record into table

On Fri, 1 Feb 2008 11:09:11 -0800,
wrote:

2-1-08

Hi,

I received a WORD 2003 document consisting of 500 + names, address and phone
numbers typed as:

First MI Last ? Home: 213-456-7890 (return)
123 Main St ? Work: 213-789-0456 (return)
City, ST ZIP ? Email: me@mydomain ¶


How do I parse the three lines of information into one line per record in
the following format:

First MI Last Street Address City ST ZIP Home # Work # Email

so I can convert the text to a table and then into a usable data file.


Thanks so much for your help.

Joanne


This is essentially the same problem as converting an existing label document
into a mail merge data source. Read
http://www.gmayor.com/convert_labels...mail_merge.htm and start with the part
of the procedure after the "Convert Table To Text" dialog. It explains how to
use the Replace function to make each piece of information into a separate
paragraph, with a unique marker at the end of each record.

In your case, you want to move the Home, Work, and Email pieces after the City
ST ZIP piece. That could be done with a wildcard replacement
(http://www.gmayor.com/replace_using_wildcards.htm) or with a macro. This could
get complicated if some of the records don't have some of these pieces filled
in, or if some of the street addresses are more than one line.

--
Regards,
Jay Freedman
Microsoft Word MVP FAQ: http://word.mvps.org
Email cannot be acknowledged; please post all follow-ups to the newsgroup so all may benefit.
  #3  
Old February 1st, 2008, 07:43 PM posted to microsoft.public.word.tables
Doug Robbins - Word MVP
external usenet poster
 
Posts: 8,239
Default Convert multiple lines of text record into table

Answered your identical question in the mailmerge fields newsgroup. Please
do not post the same question separately to multiple newsgroups.

--
Hope this helps.

Please reply to the newsgroup unless you wish to avail yourself of my
services on a paid consulting basis.

Doug Robbins - Word MVP

"
wrote in message ...
2-1-08

Hi,

I received a WORD 2003 document consisting of 500 + names, address and
phone
numbers typed as:

First MI Last ? Home: 213-456-7890 (return)
123 Main St ? Work: 213-789-0456 (return)
City, ST ZIP ? Email: me@mydomain ¶


How do I parse the three lines of information into one line per record in
the following format:

First MI Last Street Address City ST ZIP Home # Work # Email

so I can convert the text to a table and then into a usable data file.


Thanks so much for your help.

Joanne



  #4  
Old February 1st, 2008, 08:47 PM posted to microsoft.public.word.tables
Suzanne S. Barnhill
external usenet poster
 
Posts: 31,786
Default Convert multiple lines of text record into table

If by "return" you mean a line break (as opposed to the paragraph break
represented by ¶), then this would be fairly simple. Replace the line breaks
with tabs, then Table | Convert | Text to Table, separating at tabs and
making sure that the resulting table has six columns. Rearrange the columns
into the desired order, then use something on the order of
http://word.mvps.org/FAQs/TblsFldsFm...meLastName.htm to split
the Name and City/State/ZIP columns into separate columns. Also, it's quite
possible you could replace the spaces between city and state, state and ZIP
with tabs before converting to a table by using wildcards (assuming all
states are two-letter abbreviations and all ZIPs have the same number of
digits).

--
Suzanne S. Barnhill
Microsoft MVP (Word)
Words into Type
Fairhope, Alabama USA

"
wrote in message ...
2-1-08

Hi,

I received a WORD 2003 document consisting of 500 + names, address and
phone
numbers typed as:

First MI Last ? Home: 213-456-7890 (return)
123 Main St ? Work: 213-789-0456 (return)
City, ST ZIP ? Email: me@mydomain ¶


How do I parse the three lines of information into one line per record in
the following format:

First MI Last Street Address City ST ZIP Home # Work # Email

so I can convert the text to a table and then into a usable data file.


Thanks so much for your help.

Joanne



 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:39 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.