Reply
 
Thread Tools Display Modes
  #1   Report Post  
davis
 
Posts: n/a
Default Want to Repeat Records certain number of times

Procedu MailMerge
Word Version: Word 2000
OS: Windows 2000
DataSource: Word Document.

Problem:
I'm trying to do a mailing label mailmerge that will allow me to repeat a
record N times depending on a value in one of the fields. For example, I have
a numeric field called 'numberofcopies' and for each number of copies, I want
the record repeated in the merge. So if the value is 5, then I want that
record merged 5 times. I then want to look at the next record and find out
the value of 'numberofcopies' so that record will be repeat however many
times and so on. I want all these records to appear on the same page and not
on different pages. I have tried looking at vba scripting but with no
success. I know it is a FOR..Each loop I want in the main document but have
no idea how to put it in there. Any ideas?
  #2   Report Post  
Doug Robbins
 
Posts: n/a
Default

There is no way that you can do that with mailmerge. It should be possible
however to create a macro that would do it, by iterating through the records
in the data sheet, getting the value in that field and then inserting the
data from that record into the cells of a table (label) in another document
the required number of times before moving onto the next record.

--
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
"davis" wrote in message
...
Procedu MailMerge
Word Version: Word 2000
OS: Windows 2000
DataSource: Word Document.

Problem:
I'm trying to do a mailing label mailmerge that will allow me to repeat a
record N times depending on a value in one of the fields. For example, I
have
a numeric field called 'numberofcopies' and for each number of copies, I
want
the record repeated in the merge. So if the value is 5, then I want that
record merged 5 times. I then want to look at the next record and find out
the value of 'numberofcopies' so that record will be repeat however many
times and so on. I want all these records to appear on the same page and
not
on different pages. I have tried looking at vba scripting but with no
success. I know it is a FOR..Each loop I want in the main document but
have
no idea how to put it in there. Any ideas?



  #3   Report Post  
davis
 
Posts: n/a
Default

Doug,
thanks for the reply. I'll give it a try.

davis

"Doug Robbins" wrote:

There is no way that you can do that with mailmerge. It should be possible
however to create a macro that would do it, by iterating through the records
in the data sheet, getting the value in that field and then inserting the
data from that record into the cells of a table (label) in another document
the required number of times before moving onto the next record.

--
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
"davis" wrote in message
...
Procedu MailMerge
Word Version: Word 2000
OS: Windows 2000
DataSource: Word Document.

Problem:
I'm trying to do a mailing label mailmerge that will allow me to repeat a
record N times depending on a value in one of the fields. For example, I
have
a numeric field called 'numberofcopies' and for each number of copies, I
want
the record repeated in the merge. So if the value is 5, then I want that
record merged 5 times. I then want to look at the next record and find out
the value of 'numberofcopies' so that record will be repeat however many
times and so on. I want all these records to appear on the same page and
not
on different pages. I have tried looking at vba scripting but with no
success. I know it is a FOR..Each loop I want in the main document but
have
no idea how to put it in there. Any ideas?




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
How do I type a number to show it as a squared number? NIUMOM Microsoft Word Help 3 February 13th 05 09:25 PM
Maximum number of pages in a word document Travis75 Formatting Long Documents 5 January 27th 05 06:03 AM
section page numbers in heading and total page number in footing Desparate Word user Microsoft Word Help 4 January 7th 05 11:01 PM
Any way to link text with Figure or Table number? Richard Stanford Microsoft Word Help 1 January 4th 05 03:32 PM
Counting the number of times a single word is used in a Word XP do mmm Microsoft Word Help 1 November 28th 04 03:36 PM


All times are GMT +1. The time now is 04:00 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"