Reply
 
Thread Tools Display Modes
  #1   Report Post  
Posted to microsoft.public.word.mailmerge.fields
sunbeam sunbeam is offline
external usenet poster
 
Posts: 1
Default Creating labels using mailmerge

Is it possible to designate a starting point for the printing of labels?
Each set I print starts at Row 1, Column 1 and I would like to be able to use
any unused labels for a future printing.
  #2   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Doug Robbins - Word MVP Doug Robbins - Word MVP is offline
external usenet poster
 
Posts: 8,832
Default Creating labels using mailmerge

After you setup your label type mail merge main document with a data source
and the mergefields, if you run the following macro, it will ask you how
many labels have already been used on the sheet and then insert the
necessary number of blank rows into the datasource so that the first record
containing data is printed on the first unused label.

Macro 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


--
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, originally posted via msnews.microsoft.com

"sunbeam" wrote in message
...
Is it possible to designate a starting point for the printing of labels?
Each set I print starts at Row 1, Column 1 and I would like to be able to
use
any unused labels for a future printing.


  #3   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Peter - Teacher Peter - Teacher is offline
external usenet poster
 
Posts: 1
Default Creating labels using mailmerge

On Dec 8, 3:29*am, "Doug Robbins - Word MVP"
wrote:
After you setup your label type mail merge main document with a data source
and the mergefields, if you run the following macro, it will ask you how
many labels have already been used on the sheet and then insert the
necessary number of blank rows into the datasource so that the first record
containing data is printed on the first unused label.

Macro 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

--
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, originally posted via msnews.microsoft.com

"sunbeam" wrote in message

...



Is it possible to designate a starting point for the printing of labels?
Each set I print starts at Row 1, Column 1 and I would like to be able to
use
any unused labels for a future printing.- Hide quoted text -


- Show quoted text -


My database has a zip code which is 00123. When we merge it only say
123. How do you merge to use the leading zero's - what switches can
you put in the word document? Any assistance - greatly appreciated

Peter
  #4   Report Post  
Posted to microsoft.public.word.mailmerge.fields
Graham Mayor Graham Mayor is offline
external usenet poster
 
Posts: 19,312
Default Creating labels using mailmerge


"Peter - Teacher" wrote in message
...

My database has a zip code which is 00123. When we merge it only say
123. How do you merge to use the leading zero's - what switches can
you put in the word document? Any assistance - greatly appreciated


Peter


See the section on zips at http://www.gmayor.com/formatting_word_fields.htm

--

Graham Mayor - Word MVP

My web site www.gmayor.com
Word MVP web site http://word.mvps.org



Reply
Thread Tools
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Creating a Mailmerge document WITHOUT a data source Barbara P Mailmerge 2 July 30th 09 02:58 AM
Help in creating Form with Mailmerge Jon Mailmerge 2 September 20th 07 06:47 AM
Need Helping Creating Mailmerge File Sondra Mailmerge 5 August 11th 06 06:30 AM
Creating address labels with mailmerge [email protected] Mailmerge 2 March 22nd 06 08:13 PM
Mailmerge error when creating list Jason Malia Mailmerge 1 January 2nd 06 08:35 AM


All times are GMT +1. The time now is 03:43 PM.

Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 Microsoft Office Word Forum - WordBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Word"