Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail Merge label flow
Is there a way to set the flow into a label table to go down the columns
instead of accross the rows? When I have them alphabetized, it would be much easier to tear the page of labels into columns and put them on the envelopes. |
#2
Posted to microsoft.public.word.mailmerge.fields
|
|||
|
|||
Mail Merge label flow
If you datasource is a table in a Word document, open that file and run the
following macro: ' Macro to assign numbers to data source so that it can be sorted to cause labels to print down columns Dim Message, Title, Default, labelrows, labelcolumns, i As Integer, j As Integer, k As Integer Message = "Enter the number of labels in a row" ' Set prompt. Title = "Labels per Row" ' Set title. Default = "3" ' Set default. ' Display message, title, and default value. labelcolumns = InputBox(Message, Title, Default) Message = "Enter the number of labels in a column" ' Set prompt. Title = "Labels per column" ' Set title. Default = "5" ' Set default. labelrows = InputBox(Message, Title, Default) ActiveDocument.Tables(1).Columns.Add BeforeColumn:=ActiveDocument.Tables(1).Columns(1) ActiveDocument.Tables(1).Rows(1).Range.Cut k = 1 For i = 1 To ActiveDocument.Tables(1).Rows.Count - labelcolumns For j = 1 To labelrows ActiveDocument.Tables(1).Cell(i, 1).Range.InsertBefore k + (j - 1) * labelcolumns i = i + 1 Next j k = k + 1 i = i - 1 If k Mod labelcolumns = 1 Then k = k - labelcolumns + labelcolumns * labelrows Next i ActiveDocument.Tables(1).Sort FieldNumber:="Column 1" ActiveDocument.Tables(1).Rows(1).Select Selection.Paste ActiveDocument.Tables(1).Columns(1).Delete It will re-arrange the records so that they are in the order necessary for the records as they were originally sorted to print down then across, rather than across then down. If the data is in some other source, first use a catalog or directory type mail merge main document in which you have the merge fields in the cells of a one row table, with nothing else in the document. Executing that merge to a new document will give you a document containing a table with a row of data for each record in the original data source. Insert a row at the top of that table and into the cells of that row, type in the names of the mergefields. Then run the macro on that document and use it as the data source for your merge. Another way to achieve the same result is to start with a catalog or directory type mail merge main document that is formatted for as many columns as your labels with the column dimensions and space between them matching the width and horizontal spacing of the labels. The margins of the document will need to match those of the label sheet. Then in the first column, insert a one cell table with the height of the cell equal to the height of a label (plus the vertical space between the labels. Then attach the original data source to the document and insert the mergefields in the configuration that you want them into the cell. Then execute the merge to a new document. If you got the setup correct, you should then get a document that resembles the label sheets with the labels in the order that you want. -- 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 "Sandy@theblade" wrote in message ... Is there a way to set the flow into a label table to go down the columns instead of accross the rows? When I have them alphabetized, it would be much easier to tear the page of labels into columns and put them on the envelopes. |
Reply |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Mail merge label only puts one label per page? | Mailmerge | |||
label mail merge | Mailmerge | |||
mail merge data to flow up and down rather than left to right | Mailmerge | |||
How do you save a mail merge label document as JUST a label doc? | Mailmerge | |||
Mail Merge automatically resetting my mail label option selection | Mailmerge |