Re: mail merge
- From: Curt <Curt@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 24 Jun 2007 06:34:00 -0700
Will be able to use this in my next endevor
"Doug Robbins - Word MVP" wrote:
To do this, first you will need to create a catalog (or in Word XP and.
later, it is called "directory") type mailmerge in the maindocument of which
you insert a one row table into the cells of which you insert the field
names from your data source.
If the number of labels required for each record is in the data source,
insert the name of that field in the last cell of the row. If it is not
contained in the data source, have one empty cell at the end of the row.
Then you execute that merge to a new document. The new document that is
created will contain a row of data for each record in the data source. If
the data source did not include a field with the required number of each
label, enter those numbers in the last column of the table in this new
Then with that document as the active document, run a macro that contains
the following code:
Dim i As Long, j As Long, k As Long, numlabels As Long
Dim source As Document
Dim stable As Table, ttable As Table
Dim arow As Row
Dim numrange As Range
Set source = ActiveDocument
Set stable = source.Tables(1)
k = stable.Columns.Count
For i = stable.Rows.Count To 1 Step -1
Set numrange = stable.Cell(i, k).Range
numrange.End = numrange.End - 1
numlabels = Val(numrange.Text)
If numlabels > 1 Then
For j = 2 To numlabels
This will increase the number of rows of data for each record to the number
of labels that you want. Now, you must insert a row at the top of this
document and enter the field names into the cells of that row. Then save
this document and use it as the data source for creating your labels by mail
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
"Denys" <denys@xxxxxxxxxx> wrote in message
Thanks for helping me as I am a beginner with mail merge.
I have an Access database with information regarding perennial plants. I
need to print labels for each one of the plants. My problem is that I
can't figure out the mail merge to print more than one label at times.
let's say I have plant "A" with a quantity of 20, I want to mail merge to
print 20 labels of Plant "A" as well as carrying on printing the other
labels also. Is it possible?
- Prev by Date: Re: print multiple pages after mail merge on a single sheet of pap
- Next by Date: Re: Mail Merge: If ... then ... else
- Previous by thread: Re: mail merge
- Next by thread: all page numbers became 1 after mail merge