Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #3  
Old 11-17-2018, 01:09 PM
dbrawner dbrawner is offline Mail Merge Repeat Record a certain number of times Windows 10 Mail Merge Repeat Record a certain number of times Office 2019
Novice
 
Join Date: Nov 2018
Posts: 3
dbrawner is on a distinguished road
Default Code does not move to next record after reaching count

Your code for repeating a merge record n times based on a database field value was just what I was looking for...

The only issues I'm having with the actual running of the code are;


1. it does not move to the next record after the required count is reached. In fact the record jut repeats over and over until the label page is full.


2. the second issue is formatting. I need to insert line feeds or carriage returns between the mergefields.


Here is the code I am using;

{IF{MERGEREC}= 1 {SET Idx 0}}{IF{Idx}<> {MERGEREC} "{SET Data "{MERGEFIELD LABEL_NAME} {MERGEFIELD SKU}"}{SET QTY {MERGEFIELD Quantity}}{SET Idx {MERGEREC}}"}{SET QTY {=QTY-1}}{REF DATA}{NEXTIF {QTY}= 0}

I have a subset of data in a spreadsheet with only two records each having a quantity value of three (3).

When I copy the code into 4 rows of 4 columns on label merge (using MS365 Word), only one record is repeated in all 16 labels.


Can you help me?
Reply With Quote
 

Tags
mail merge



Similar Threads
Thread Thread Starter Forum Replies Last Post
Repeat formula 5 times and repeat? Jenny345 Excel 4 06-14-2013 04:37 PM
Mail Merge Repeat Record a certain number of times mail merge skips 16th record only - of 23 total. passenger Mail Merge 1 07-24-2012 04:03 PM
Mail Merge Repeat Record a certain number of times Mail merge to print each record as it is created PNGento Mail Merge 1 01-26-2012 02:00 PM
avoid duplicete record and merge the record with the existed record hemant.behere Excel 0 01-10-2012 02:53 AM
Extraneous record in Word Mail Merge aldo13 Mail Merge 0 01-23-2006 01:58 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 06:28 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft