Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Mailmerge Directory - TableJoiner Macro

Status
Not open for further replies.

Gwinnett

Instructor
Feb 24, 2017
2
0
0
US
Hello,
I have successfully 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 ( 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 mailmerge code I am using and the macro supplied by Macropod.

Cheers,

Mailmerge_Code_HS-MS_Recap_fvto5o.png



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
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top