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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
How do I merge label records down then across?
I want to run a mailmerge on a 30-label per page basis, but I want the
document to merge records 1-10 in the first column, 11-20 in the second, 21-30 in the third, and so on in 10s down and across subsequent pages. All I can get WORD to do is across the rows (1-3) then down (4-6, 7-9, etc.) Everything else works beautifully. Help! |
#2
|
|||
|
|||
If you have Access, it can do this automatically. Otherwise, if the
datasource is table in Word, you can use 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 -- Please respond to the Newsgroup for the benefit of others who may be interested. Questions sent directly to me will only be answered on a paid consulting basis. Hope this helps, Doug Robbins - Word MVP "TheFunRev" wrote in message ... I want to run a mailmerge on a 30-label per page basis, but I want the document to merge records 1-10 in the first column, 11-20 in the second, 21-30 in the third, and so on in 10s down and across subsequent pages. All I can get WORD to do is across the rows (1-3) then down (4-6, 7-9, etc.) Everything else works beautifully. Help! |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
New records can't be seen | rleblanc | Using Forms | 6 | August 14th, 2004 02:43 PM |
Label | SRIT | General Discussion | 2 | June 22nd, 2004 09:42 PM |
Merge to Fax with SBS/Exchange? | Tom | Mailmerge | 3 | May 18th, 2004 11:22 PM |
Mail merge dropping records | Jan | Mailmerge | 2 | May 13th, 2004 12:00 AM |