Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-28-2017, 08:12 AM
Gwinnett Gwinnett is offline Mailmerge Directory - TableJoiner Macro Windows 7 64bit Mailmerge Directory - TableJoiner Macro Office 2013
Novice
Mailmerge Directory - TableJoiner Macro
 
Join Date: Feb 2017
Posts: 5
Gwinnett is on a distinguished road
Default Mailmerge Directory - TableJoiner Macro

Hello,
I have sucessfully used the macros in Macropod’s excellent Catalogue/Mailmerge Directory Tutorial to create some very useful reports. I have never tried to use the TableJoiner macro until recently and am having trouble making it work properly.
Macropod’s instructions are clear on how to use the macro, and I have successfully installed it per the instructions in Graham Mayor’s tutorial (http://www.gmayor.com/installing_macro.htm). However, when I run the TableJoiner macro nothing happens, i.e., the multiple tables created (1 per record) are not joined into one site’s table.

I am using MS Word 2013. The mailmerge code I am using creates tables grouped by site. The end product is 103 pages covering 70 sites. I thought the problem was the number of records (1442 in the Excel sheet) so I did a test on just the first 25 records (1 site). Still, the individual record tables do not join when I run the macro. I am stumped at this time.

Perhaps someone can see the error and point me in the right direction? Below is the TableJoiner macro code I am using and the macro supplied by Macropod. I have attached a copy of mailmerge code and a short test mailmerge output document.

Cheers,




Sub TableJoiner()
Application.ScreenUpdating = False
Dim oPara As Paragraph
For Each oPara In ActiveDocument.Paragraphs
With oPara.Range
If .Information(wdWithInTable) = True Then
With .Next
If .Information(wdWithInTable) = False Then
If .Text = vbCr Then .Delete


End If
End With
End If
End With
Next
Application.ScreenUpdating = True
End Sub
Attached Images
File Type: png Mailmerge Code HS-MS Recap.PNG (43.5 KB, 25 views)
Attached Files
File Type: docx Date1.docx (17.6 KB, 11 views)
Reply With Quote
  #2  
Old 02-28-2017, 02:54 PM
macropod's Avatar
macropod macropod is online now Mailmerge Directory - TableJoiner Macro Windows 7 64bit Mailmerge Directory - TableJoiner Macro 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

The TableJoiner macro will only join tables that are separated by nothing more than an empty paragraph. Your screenshot shows there's at least a space character separating them as well.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 03-01-2017, 12:22 AM
macropod's Avatar
macropod macropod is online now Mailmerge Directory - TableJoiner Macro Windows 7 64bit Mailmerge Directory - TableJoiner Macro 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

Cross-posted at: http://www.tek-tips.com/viewthread.cfm?qid=1775016
For cross-posting etiquette, please read: http://www.excelguru.ca/content.php?184
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 03-01-2017, 09:25 AM
Gwinnett Gwinnett is offline Mailmerge Directory - TableJoiner Macro Windows 7 64bit Mailmerge Directory - TableJoiner Macro Office 2013
Novice
Mailmerge Directory - TableJoiner Macro
 
Join Date: Feb 2017
Posts: 5
Gwinnett is on a distinguished road
Default Mailmerge Directory - TableJoiner Macro

Thanks, Macropod, for the assist. It's the small stuff that creates the biggest problems, eh? My new code is attached and the macro works properly now.

Also thanks for the information on cross-posting. I shall bear it in mind for future posts. My reply was also posted to http://www.tek-tips.com/viewthread.cfm?qid=1775016
Cheers,
Attached Images
File Type: png Mailmerge Code HS-MS Recap_Fixed.PNG (48.0 KB, 26 views)
Reply With Quote
Reply

Tags
macro, mailmerge, tablejoiner



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mailmerge Directory - TableJoiner Macro Word 2010 Macro to rename Folder in Directory staicumihai Word VBA 2 10-28-2016 03:01 AM
Mailmerge Directory - TableJoiner Macro How To Apply A VBA Macro to All Subfolders in a Directory of a docx. Extension jc491 Word VBA 8 09-11-2015 08:31 AM
Directory MailMerge with Category Grouped Lists on Labels screech Mail Merge 3 06-18-2014 11:41 PM
Mailmerge Directory - TableJoiner Macro Pictorial directory using mailmerge JohnFinNC Mail Merge 6 10-04-2012 06:36 PM
Mailmerge Directory - TableJoiner Macro Directory Mailmerge rohitjain80 Mail Merge 1 02-12-2012 03:42 AM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:32 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