Re: Word to Excel - Labels convert (2003)

The following macro will export the file to a tab-delimited text file that can be imported into Excel or Access.
You will have to do some post-processing since not all addresses have the same number of lines.

Re: Word to Excel - Labels convert (2003)

Hans,
OK. I am not the best at reading code explicitly but when you say post-processing do you mean I put an "Paragraph" (by pressing enter) mark at the end of each address? I have converted it into a single column of text right now with only line breaks between each field right now. Should I put an enter mark after every zip code first before running the code? Is there an easy way to find each zipcode in the single column of text and replace it with a single paragraph mark? Is there in other words a format that I could use to find the end of 5 numbers in a row and place a paragraph mark at the end of each that it finds?

Re: Word to Excel - Labels convert (2003)

The code that I posted will convert each address label into a single line, with tab characters between the parts of the address. So if you open the text file in Excel, each part of the address will be in a separate cell.
But you will find that some addresses are spread over 4 columns and others over 5 columns, because some of the original labels had 4 lines and others had 5 lines.

Re: Word to Excel - Labels convert (2003)

Thank you Hans. I did not have any luck with the code. It didn't perform any action at all. I went ahead and spent the time converting the labels to .rtf, so they'd be in one solid line, replacing all end line paragraph marks with a single tab character...then placing in a table (Word), needless to say it took all day to shift the addresses to the correct lines (highlight, drag) as they were all out of whack (would they be any other way?) <img src=/S/hairout.gif border=0 alt=hairout width=31 height=23> ...then copied and pasted to a spread sheet...then imported into access. I reckon the lady I was fixing it for can proof it and ensure everything is in the right order...if it's not, it will only be one or two occurances here or there where some had more than one address and she will need to fix that however she wants.

Re: Word to Excel - Labels convert (2003)

Hans,
Your absolutely right. I did not notice it. I looked inside the My Documents folder, and wa-la...there it was. I did not think to check the default save folder (MyDocs) for a text file. I was assuming it would auto-open, and when nothing happened I assumed...nothing happened. Your code would have saved me hours...alas...I cannot cry now...whats done is done. But at least next time I will know, and hopefully this post may help someone else...(keep them from not noticing the perfectly good text file) and not working all afternoon on something they missed.
Always grateful

Word to Excel - Labels convert (2003)

I have acquired a very large sheet of address labels. I am not sure how the person created it to begin with, but they evidently did not use field names, and if so, they are no omitted in this label document. I am attaching a single sheet of 68 pages of labels so that you can see the problem.
What I want to do is take the 68 pages of labels and convert them to an Excel spreadsheet with appropriate column names...then import that spreadsheet into an Access database (unless it can be taken directly into a new table in an Access database without first putting it into excel).
Can you give me a clue how I can do this without having to take each individual label and do this from scratch...copy paste...etc. which would take all day.