Wronge Format for label mailmerge

T

Tom

I have a list of addresses in Excel 07. To create a booklet of these
addresses, I created a mailmerge page 11" wide X 8 1/2" high, 4 columns and 8
rows. The first 2 columns will appear on page 1, and the two right columns
will appear on page 9 when completed and folded. I'm okay with the mailmerge
process except for the automatic placement of my records. Records 1 through 8
should appear in the left column, 9 through 16, next column, then 17 through
24 in the 3rd column, then 25 through 32 in the last column, columns going
from left to right. In this manner, when the booklet is folded, all addresses
throughout the multiple pages will appear in alphabetical order. I have
formatted my Excel source file so that the proper records are in sequential
order for the mailmerge. The problem occurs by MS Word importing the source
records in horizontal placement instead of vertical placement. Can anyone
suggest how to cause the mailmerge placement to occur in vertical format?
 
G

Graham Mayor

You would have to order the records to follow the left right assembly
process. You cannot use merge to fill the table in any other order.
The following macro from fellow MVP Doug Robbins will order the data (in
Word table format) to print up and down, but would not take care of your
additional requirement, however I suspect that if you were to merge the
pre-arranged Excel data into a single row table configured as a
directory/catalog merge document you could create a data source that the
macro would resort for you. http://www.gmayor.com/installing_macro.htm

Sub SortData()
' 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 = "8" ' Set default.
labelrows = InputBox(Message, Title, Default)
With ActiveDocument.Tables(1)
..Columns.Add BeforeColumn:=ActiveDocument.Tables(1).Columns(1)
..Rows(1).Range.Cut
End With
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
End Sub

--
<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
Graham Mayor - Word MVP


<>>< ><<> ><<> <>>< ><<> <>>< <>><<>
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top