#1
|
|||
|
|||
I have a very specific need but don't know how to do it...
To summarize: I need to print labels for mail (addressees). Yes, I know Word has had a label formatting feature for quite some time, but it relies on the addresses being in a database that identifies each field separately, as tags. Something like:
<name> Mr. John Doe Nobody <address> 105 Upndown St., Round Circle <city> Crazytown <state> ZZ <zipcode> 00000-000 <country> Far Far Away BUT... All I got was a huge text file with these addresses, all totheger and with a single blank line separating each addressee. No tags identifying name, street name, city, nothing. Only a bunch of addresses copied and pasted together. Like this: Mr. John Doe Nobody Nonumber Upndown St., Round Circle Crazytown ZZ 00000-000 Far Far Away Ms. Jane Doe Anybody 69 Pleasure Road, Greatsex Nonstop YY 99999-999 Farther Away ... Nevermind the joke addresses LOL - So what could I do to make these non-formatted addresses fit in the space of each label WITHOUT the pain of going into 2000+ entries and putting labels before each line, so they fit what Word expects? |
#2
|
||||
|
||||
From what you've posted, it appears your data can easily be reformatted for use as a mailmerge data source, using nothing more sophisticated than Find/Replace, then converting to a Word table or copying & pasting into an Excel workbook which you then use as the mailmerge data source. We'd need to see a representative sample of the actual data.
Can you attach a document to a post with some representative data (obfuscate anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen. PS: Please don't solicit paid solutions through this forum.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#3
|
||||
|
||||
If your blocks of addresses always have the same number of paragraphs then you could select all and convert to table choosing to separate text at paragraph marks and specify 7 columns.
If there is inconsistency, you could firstly find replace all paragraph marks to tabs, then double tabs to a paragraph mark. Then convert that to a table using tabs as the separator. You will need to fix the outliers (if an address block has other than 6 paragraphs) but that may be a simple-ish task. Another alternative is to simply use each address block as a single field by replacing all paragraph marks with a soft return and then replacing a pair of soft returns with a paragraph mark. Then convert that to a table with one column using paragraph marks as the separator.
__________________
Andrew Lockton Chrysalis Design, Melbourne Australia |
#4
|
||||
|
||||
See http://www.gmayor.com/convert_labels...mail_merge.htm and jump in where the illustration matches yout format. You can then use mail merge or http://www.gmayor.com/Envelope_Label_Add_In.htm to print your labels.
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
#5
|
|||
|
|||
Quote:
Now, I neither want, nor HAVE to actually fix the formatting for the letters to be correctly delivered. So if the address is like this: BRIDGE STORE AV.HELLO,123 CENTRO CEP=99999-999 MARAU-RS There is no need to change it into: BRIDGE STORE AV.HELLO,123 CENTRO CEP=99999-999 MARAU-RS Because, for the mail guys, it doesn't really matter. They can find the place with either one. BUT the suggestions made here indicate I might need to fix the formatting to have then made into mailmerge or table. To be honest, I kinda looked for a solution that didn't force me to go through the entire document putting everything with 6 lines of text - which is the maximum I could find - and then adding labels or markers. Some, maybe all of you might think I'm lazy, but the fact is these 1,000 adresses are just a sample I received from a customer. He wants to see how I deal with those and if I'm able to deliver what he needs with these first 1,000 addresses, then he'll provide me with 10x more. And he wants it fast and cheap! Printing is done in minutes, but this job can't take much time to be solved before printing. It will take many, many hours to sort through 10,000 addresses fixing their formatting, that's crazy. OK, sorry about that, was written in a moment of little despair. Tried to catch attention to the problem, it's all. Not gonna happen again. |
#6
|
|||
|
|||
Here's an idea I had, but since I don't know how to do it in Word or if it's even feasible, I bring it to the more experienced guys. The page I use for labels measure 215x320 mm; each label is 41x61 mm and are all contiguous, no space between them either vertically or horizontally. They are all pre-cut in this adhesive sheet.
What I figured as a fast and effective solution to the problem is a way to make little "windows" that are connected to each other in a way that, when the text overflows from one window, it continues on the next one. When the last window of a page has its capacity filled, the text then flows to the first window of the next page and so on, automatically creating new pages as needed. Because the addresses have varying number of lines/paragraphs, I could then simply press Enter enough times to push the whole text behind that point, effectively putting the addresses below in their correct windows. This task would consume much, much less time than having to turn the whole bunch of addresses into a proper database or table, which is not a demand of my customer. I rather prefer not having to do it if a simpler solution exists or can be made! Attached is a zip file containing images for better understanding, using the same 25 addresses attached in my previous post. What you guys think, is such a solution simple to do, or at all possible? If it's possible to make such a "windows grid mask" (I don't how the correct name) with variables for sizes, it could be adapted to labels of other sizes and quantities as well. In this example it's a 5x5 grid but I have labels in 4x4 to 7x7 grids as well as 4x6 and 6x9. Last edited by Bugfinder; 11-12-2017 at 10:51 AM. Reason: added information |
#7
|
||||
|
||||
Your attachment in post #5 is a plain text file, not a Word document, so I can only assume the structure is the same.
Achieving your desired outcome will take some work to do, but it is possible. For the layout indicated in your 1.jpg:- 1. Insert your content into a document with your page size, oriented in landscape format. 2. Set the page margins to: top=4.8mm; bottom=4.8mm; left=7.5mm; right=7.5mm. 3. Set the page layout to 5 columns, with 0 space between the columns. This will give a column width of 61mm. 4. Using a wildcard Find/Replace, choose: a) Find = ^13 Replace = ^l b) Find = ^l^l Replace = ^p c) Find = ^32CEP Replace = ^lCEP d) Find = (CEP=[0-9\-]@)^32 Replace = \1^l 5. Select all (Ctrl-A), then choose Insert|Table>Convert text to table>OK. 6. With the table remaining selected, choose Table Tools|Layout|Properties>Table>Alignment:Center>Opt ions Left:0, Right:0, 'Automatically resize to fit contents':unchecked>OK>Row>Specify Height>41mm>Row height is:Exactly>'Allow row to break across pages':unchecked>OK>Column>Preferred width:61mm At this stage, all the label setup work will be done. You will still need to do things like setting paragraph format, font name & size, and so on. Some of the longer lines will probably have text-wrapping where you don't want it, so you'll have to either break those lines manually or change their font name & size so they fit. This part really can't be simplified.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#8
|
|||
|
|||
Hi Paul, thank you for your great help! You taught me how to do it, thanks a lot. I noticed that the text ended being too close to the frame border, so in the table properties, instead of putting 0 for left and right, I chose to write 0.3 cm each, plus 0.3 cm on top. This insured there was no possibility of text accidentaly being printed too close to the label cutline and letters from one label touching the letters of the labels on either sides.
May I ask you one more instruction? In the example I sent here, there were no extra spaces at the end of lines. But in the rest, there are some addresses with useless spaces. Like this: ADDRESS[ _______________ ]end of line <<< lots of spaces This causes a problem because some addresses ended mixed together. What are the find/replace strings to delete extra spaces at the end of each line, no matter if 1 or 10? And most importantly, at which point should this find/replace be done? Before or after step 4a? |
#9
|
||||
|
||||
You could do a simple Find/Replace, where:
Find = ^w Replace = ^32 at any time in the process. I'd be inclined to do it first, before setting the wildcards option, but it could even be done after the table has been created and after turning off the wildcards option.
__________________
Cheers, Paul Edstein [Fmr MS MVP - Word] |
#10
|
|||
|
|||
That helped, but what was causing the merging problem is some of the empty lines separating each adressee aren't actually empty. About 450 of these lines contained 1 or more spaces. After applying your last command, it left them with 1 space, which still caused merging of addresses into a single cell. What's needed in this case is to make the separating blank line with 1 space into an actual blank line with no single space. Without wildcards, I did this:
Find = ^p ^p Replace = ^p^p And that did the trick! Everything worked as intended. Mr. Edstein, you are my new hero. That was my 47th b-day present (it's still Nov. 12 here in Brazil ) |
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Insert specific picture and add specific Text to it | Syasthe | Word VBA | 1 | 11-02-2017 02:08 AM |
Have a very specific requirement | ggoffice000 | Excel Programming | 2 | 02-03-2017 03:47 PM |
Print attachment when it arrive in specific folder with specific subject | visha_1984 | Outlook | 1 | 01-30-2013 10:42 AM |
Specific Hyperlink | dextrousdave | Word | 1 | 01-16-2012 09:10 PM |
Looking for a specific spreadsheet | DivideByZer0 | Excel | 3 | 11-10-2009 05:58 PM |