Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-11-2016, 09:56 AM
rbr rbr is offline Mail Merge with variable table length MS Word 2013 Windows 10 Mail Merge with variable table length MS Word 2013 Office 2013
Novice
Mail Merge with variable table length MS Word 2013
 
Join Date: Nov 2016
Posts: 4
rbr is on a distinguished road
Default Mail Merge with variable table length MS Word 2013

Hello,

I'm looking for a solution to mail merge (type=directory) with a variable lengt table, without the use of macro's. This seems to work with copying the same merge fields on each line. However, because the datafile can contain 1, 100 or 10.000 records this is kind of shit because I have to add, by example, 10.000 empty lines. This can result in 1 file with a lot of pages while there is only data on the first page. I'm looking for a solution for this problem. Unfortunately the rule "next record" doesn't insert a new line in the table with the next record.

I added an example in this post.



I tried different options and searched a lot on google but I can't find a solution. Most posts on this forum are going above of my head and are solutions for more complex merge problems. Hope you guys can give me an easy solution based on the attached example.

Regards,
Ruud
Attached Files
File Type: docx test.docx (12.7 KB, 16 views)
File Type: txt test.txt (182 Bytes, 17 views)
Reply With Quote
  #2  
Old 11-11-2016, 03:09 PM
macropod's Avatar
macropod macropod is offline Mail Merge with variable table length MS Word 2013 Windows 7 64bit Mail Merge with variable table length MS Word 2013 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

Did you do a search? This issue has been discussed many times...
https://www.msofficeforums.com/mail-...ble-merge.html
https://www.msofficeforums.com/mail-...directory.html
https://www.msofficeforums.com/mail-...ail-merge.html
https://www.msofficeforums.com/mail-...ge-letter.html
https://www.msofficeforums.com/mail-...-supplier.html
https://www.msofficeforums.com/mail-...erge-send.html
etc., etc.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 11-14-2016, 09:03 AM
rbr rbr is offline Mail Merge with variable table length MS Word 2013 Windows 10 Mail Merge with variable table length MS Word 2013 Office 2013
Novice
Mail Merge with variable table length MS Word 2013
 
Join Date: Nov 2016
Posts: 4
rbr is on a distinguished road
Default

Hi,

I read the manual but it described a lot of situations which are more complex than the solution I was looking for. That's why I found it pretty hard to get the result I wanted and opened a thread.

However, I took some time to experimentalize and almost got the result I want. I managed to fill the table but I can't get it to work with a seperate header. Actually I just want to use a header in my table which doesn't repeat itself on each line. As well I'm looking to add text before or after the merge. By doing this the text keeps repeating itself for each line. Probably the same problem as with the header.

I tried to work with a continous section break but the merge ignores the sections. Any help with this would be much appreciated. I added the document again with the results so far. I used the same dataset as with the opening post.

Regards,
Ruud
Attached Files
File Type: docx Test.docx (14.1 KB, 16 views)
Reply With Quote
  #4  
Old 11-14-2016, 02:23 PM
macropod's Avatar
macropod macropod is offline Mail Merge with variable table length MS Word 2013 Windows 7 64bit Mail Merge with variable table length MS Word 2013 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

In the tutorial, the very first example, titled Merge Records By Category, provides the 'simple' solution. From there it builds ever more complex solutions, including solutions that address your need. All it takes is the time to read and apply. The hard work - the field coding - has all been done for you.

The DATABASE field examples that are linked to in those threads show yet another way of achieving the same end, as do the links to the 'Many to One' utilities.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-18-2016, 05:01 AM
rbr rbr is offline Mail Merge with variable table length MS Word 2013 Windows 10 Mail Merge with variable table length MS Word 2013 Office 2013
Novice
Mail Merge with variable table length MS Word 2013
 
Join Date: Nov 2016
Posts: 4
rbr is on a distinguished road
Default

Ok, I managed to get one step further.

Actually the tutorial on this website http://cornell.veplan.info/article.aspx?&a=3815 helped me to futher understand the coding from the mailmerge and how to edit it (ctrl+f9).

When trying to convert the output to a table MS Word automatically inserts a paragraph break which I can't delete in my mailmerge document. Is this even possible?

I tried to work with the macro from the manual, but this only delete's the paragraph break between the header and the first line. Am I doing something wrong?
Attached Files
File Type: docx Example.docx (15.3 KB, 18 views)
Reply With Quote
  #6  
Old 11-18-2016, 05:47 AM
macropod's Avatar
macropod macropod is offline Mail Merge with variable table length MS Word 2013 Windows 7 64bit Mail Merge with variable table length MS Word 2013 Office 2010 32bit
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,962
macropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond reputemacropod has a reputation beyond repute
Default

My tutorial provides everything you need for this, without requiring you to learn the intricacies of field coding. It even includes a macro for handling the splits that occur when working with tables. Did you even read the 'Merging to Tables' topic in the tutorial?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 11-18-2016, 07:05 AM
rbr rbr is offline Mail Merge with variable table length MS Word 2013 Windows 10 Mail Merge with variable table length MS Word 2013 Office 2013
Novice
Mail Merge with variable table length MS Word 2013
 
Join Date: Nov 2016
Posts: 4
rbr is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
My tutorial provides everything you need for this, without requiring you to learn the intricacies of field coding. It even includes a macro for handling the splits that occur when working with tables. Did you even read the 'Merging to Tables' topic in the tutorial?
Hi There,

Yes I did read the manual. However, I executed the macro tablejoiner, and also tried the macro tablesummarize but it only merges my header line with the first tablerow...

I also tried it with the examples from the manual and it works fine there. Still don't understand why it doesn't work with my the doc which I attached in the previous post.

Started to edit my mailmerge document again by using 1 key and work with <>0 in stead of comparing 2 keys and then tried the tablejoiner macro and it works fine now.
Added the macro in the normal.dot.
Attached Files
File Type: docx Example_final.docx (15.5 KB, 20 views)
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge with variable table length MS Word 2013 Mail merge at large table with variable number of rows blar Mail Merge 1 10-19-2015 03:04 PM
Creating Barcode Badges using Microsoft Word Mail Merge 2013 Sarah15 Mail Merge 4 04-16-2015 06:03 AM
Mail Merge with variable table length MS Word 2013 Labels are not printed the way they are shown on the screen! (Word 2013 via Mail Merge) malinneedshelp Mail Merge 2 12-09-2014 03:08 AM
Mail Merge with variable table length MS Word 2013 Any Solutions for Word 2013 DBase Mail merge. pld32 Mail Merge 1 01-08-2014 02:49 PM
Mail Merge with variable table length MS Word 2013 Import from variable length text diouna Excel 3 07-10-2012 09:43 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 09:53 PM.


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