Group:  Microsoft Word ยป microsoft.public.word.mailmerge.fields
Thread: Word 2000 - Mail Merge/labels

Geek News

Word 2000 - Mail Merge/labels
"Abay" <abcd[ at ]aol.com> 5/28/2007 1:30:16 AM
Hello ... I am creating mailing labels using the Mail Merge feature of
Word. All works fine except when I don't have a full page of labels i.e.
some are already used. I know when you do a single label (Not through Mail
merge) you can specify where you want to print it on the page, (row and
column) but cannot see that option when doing a merge with the source coming
from an external file.

Any help on this would be much appreciated.

Abay




Re: Word 2000 - Mail Merge/labels
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> 5/28/2007 5:15:48 AM
The only way to do that is to insert the necessary number of blank records
at the beginning of the data source. If your data source is a Word
document, the following macro will do that for you:

'Macro created by Doug Robbins to set the first label on a part sheet of
labels for a label type mailmerge.
Dim MMMDoc As Document
Dim dsource As Document
Dim dtable As Table
Dim i As Long, j As Long
Set MMMDoc = ActiveDocument
With MMMDoc.MailMerge
If .MainDocumentType = wdMailingLabels Then
If .State = wdMainAndDataSource Then
Set dsource = Documents.Open(.DataSource.Name)
Set dtable = dsource.Tables(1)
i = InputBox("Enter the number of labels that have already been
used on the sheet.", "Set Starting Label")
If IsNumeric(i) Then
With dtable
For j = 1 To i
.Rows.Add BeforeRow:=.Rows(2)
Next j
End With
End If
.Destination = wdSendToNewDocument
.Execute
End If
End If
End With
dsource.Close wdDoNotSaveChanges

The macro needs to be run when you have the mailmerge main document already
set up and it will send the merge to a new document that you can then print
out onto your labels.

If your data source is not a Word document, you can create a Word document
as the data source by creating a Catalog or Directory type mail merge that
uses your original data source in the main document of which, you insert a
one row table with as many columns as there are fields in your data source
and then you insert the merge fields into the cells of that table. Then you
execute that merge to a new document and then insert a new row at the top of
the table that will be in that document and into the cells of that new row,
you enter the names of the merge fields. Then save that document and use it
as the data source.

--
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

"Abay" <abcd[ at ]aol.com> wrote in message
news:e43wBeMoHHA.1240[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> Hello ... I am creating mailing labels using the Mail Merge feature of
> Word. All works fine except when I don't have a full page of labels i.e.
> some are already used. I know when you do a single label (Not through
> Mail merge) you can specify where you want to print it on the page, (row
> and column) but cannot see that option when doing a merge with the source
> coming from an external file.
>
> Any help on this would be much appreciated.
>
> Abay
>
>
>
>


Re: Word 2000 - Mail Merge/labels
"Abay" <abcd[ at ]aol.com> 5/29/2007 4:25:38 AM
Many thanks for your suggestions .. will insert blank lines at the beginning
of the data source (a .csv file generated by Excel)

Really appreciate your help ..

Abay
"Doug Robbins - Word MVP" <dkr[ at ]REMOVECAPSmvps.org> wrote in message
news:OMrWGdOoHHA.5052[ at ]TK2MSFTNGP04.phx.gbl...
[Quoted Text]
> The only way to do that is to insert the necessary number of blank records
> at the beginning of the data source. If your data source is a Word
> document, the following macro will do that for you:
>
> 'Macro created by Doug Robbins to set the first label on a part sheet of
> labels for a label type mailmerge.
> Dim MMMDoc As Document
> Dim dsource As Document
> Dim dtable As Table
> Dim i As Long, j As Long
> Set MMMDoc = ActiveDocument
> With MMMDoc.MailMerge
> If .MainDocumentType = wdMailingLabels Then
> If .State = wdMainAndDataSource Then
> Set dsource = Documents.Open(.DataSource.Name)
> Set dtable = dsource.Tables(1)
> i = InputBox("Enter the number of labels that have already been
> used on the sheet.", "Set Starting Label")
> If IsNumeric(i) Then
> With dtable
> For j = 1 To i
> .Rows.Add BeforeRow:=.Rows(2)
> Next j
> End With
> End If
> .Destination = wdSendToNewDocument
> .Execute
> End If
> End If
> End With
> dsource.Close wdDoNotSaveChanges
>
> The macro needs to be run when you have the mailmerge main document
> already set up and it will send the merge to a new document that you can
> then print out onto your labels.
>
> If your data source is not a Word document, you can create a Word document
> as the data source by creating a Catalog or Directory type mail merge that
> uses your original data source in the main document of which, you insert a
> one row table with as many columns as there are fields in your data source
> and then you insert the merge fields into the cells of that table. Then
> you execute that merge to a new document and then insert a new row at the
> top of the table that will be in that document and into the cells of that
> new row, you enter the names of the merge fields. Then save that document
> and use it as the data source.
>
> --
> 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
>
> "Abay" <abcd[ at ]aol.com> wrote in message
> news:e43wBeMoHHA.1240[ at ]TK2MSFTNGP04.phx.gbl...
>> Hello ... I am creating mailing labels using the Mail Merge feature of
>> Word. All works fine except when I don't have a full page of labels i.e.
>> some are already used. I know when you do a single label (Not through
>> Mail merge) you can specify where you want to print it on the page, (row
>> and column) but cannot see that option when doing a merge with the source
>> coming from an external file.
>>
>> Any help on this would be much appreciated.
>>
>> Abay
>>
>>
>>
>>
>
>


Home | Search | Terms | Imprint Contact
Newsgroups Reader - provided by WiredBox.Net