Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-20-2020, 01:10 PM
LDower LDower is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2013
Novice
Merge All Cells in a Table via Macro
 
Join Date: Dec 2020
Posts: 6
LDower is on a distinguished road
Default Merge All Cells in a Table via Macro


Hi - I'm making a Company Christmas Letter and each letter has a message from a unique group of signers. I used Graham Mayor's Multi-to-One Mail Merge to make the letters and it worked perfectly. But I have an issue with formatting I can't figure out. I had to insert a table to get the correct message/signature to line up w/ each other - (note: the message is in a different color/format than the signature) but they show up next to each other horizontally vs vertically aligned since it's a table. However, I would like it for each message to be on top of its signature. A quick fix I found was to just merge all cells in the table afterwards and it solves that formatting issue. But I have to do that manually across all 7,500+ letters then. Is there a macro I could run or setup the document differently to prevent this issue? (I figured creating a Macro makes the most sense - but sorry if I posted in the wrong thread- first timer!)
Reply With Quote
  #2  
Old 12-20-2020, 05:13 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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: How to Merge All Cells on a Table Across Multiple Pages - Microsoft Community
For cross-posting etiquette, please read: Excelguru Help Site - A message to forum cross posters
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 12-20-2020, 06:21 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

You should be able to do all this without generating table cells that need to be merged post-mailmerge.

Without actually seeing the problem mailmerge main document, however, it can be difficult for anyone to diagnose the issue. Can you attach the mailmerge main document to a post with some representative data (delete anything sensitive)? You do this via the paperclip symbol on the 'Go Advanced' tab at the bottom of this screen.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #4  
Old 12-20-2020, 06:31 PM
LDower LDower is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2013
Novice
Merge All Cells in a Table via Macro
 
Join Date: Dec 2020
Posts: 6
LDower is on a distinguished road
Default More Data

Thanks for the info! I've attached the mail merge doc I've been having difficulty with and sample excel w/ fake data.
Attached Files
File Type: xlsx test.xlsx (8.4 KB, 6 views)
File Type: docx Christmas Letter Mockup - White Header - FINAL - MULTI.docx (23.1 KB, 6 views)
Reply With Quote
  #5  
Old 12-20-2020, 06:42 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

It's not apparent from either your mailmerge main document or your test workbook why you'd use a many-to-one merge rather than an ordinary letter merge. It's also not apparent why you have some of the content in the page header rather than in the document body. And, finally, there is no table in the document to show what it is you're trying to work around.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #6  
Old 12-20-2020, 06:52 PM
LDower LDower is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2013
Novice
Merge All Cells in a Table via Macro
 
Join Date: Dec 2020
Posts: 6
LDower is on a distinguished road
Default More Info

From the test excel - all the Signers (Column A) need to have their Message (G)/Signature(H) on a Partner (B) Letter - that's the many (messages/signatures) to one (partner) ratio. I've attached a completed example when I run the Many to One with the test info using the Mail Merge Doc provided. I then have to go in click Merge Cells to the whole Table to get the desired outcome (before/after attached). I'm looking to avoid manually having to merge all the cells in the table to get the Message and the Signature to correspond w/ each other in the proper format.

The header is different since we are printing on special letterhead - it's not relevant to the issue though.

Also the table is in there it's just borderless, if you put on the gridlines on you'll see the table. I've used a table since w/out the table it was not putting the message w/ the signature. Just doing -

message

message

message

signature

signature

signature


Thanks!
Attached Files
File Type: docx Complete Many Mail Merge Before Merge Cells.docx (22.5 KB, 5 views)
File Type: docx Desired Outcome.docx (22.4 KB, 6 views)
Reply With Quote
  #7  
Old 12-20-2020, 07:14 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

So what doesn't work with the mailmerge main document formatted as per the attached?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #8  
Old 12-20-2020, 07:30 PM
LDower LDower is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2013
Novice
Merge All Cells in a Table via Macro
 
Join Date: Dec 2020
Posts: 6
LDower is on a distinguished road
Default Reply

The desired outcome is

message
signature

message
signature

vs (w/ table)

message signature

message signature

or (w/out table)

message

message

signature

signature

I can't seem to run the many to one mail merge correctly (message correspond w/ signature) without a table and then manually merging all the cells in the table to get the desired outcome.
Reply With Quote
  #9  
Old 12-20-2020, 08:03 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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 try the attachment to my previous post?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 12-20-2020, 08:19 PM
LDower LDower is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2013
Novice
Merge All Cells in a Table via Macro
 
Join Date: Dec 2020
Posts: 6
LDower is on a distinguished road
Default

I get a Run-time Error 50290 when I try to run what you provided in your previous post.

I have tried that formatting though on my own and I get the below instead:

Message

Message

Message

Signature

Signature

Signature
Reply With Quote
  #11  
Old 12-20-2020, 09:23 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

I doubt the Run-time Error has anything to do with the document I attached.

Nevertheless, it can all be done without a macro. Try the following attachment as a Directory merge.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 12-20-2020, 11:16 PM
LDower LDower is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2013
Novice
Merge All Cells in a Table via Macro
 
Join Date: Dec 2020
Posts: 6
LDower is on a distinguished road
Default

The attached worked! Thanks so much!
Reply With Quote
  #13  
Old 12-20-2020, 11:32 PM
macropod's Avatar
macropod macropod is offline Merge All Cells in a Table via Macro Windows 10 Merge All Cells in a Table via Macro Office 2010
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,956
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

FWIW, the field coding is based on my Microsoft Word Catalogue/Directory Mailmerge Tutorial: https://www.msofficeforums.com/mail-...-tutorial.html
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
Reply

Tags
macro help, many to one mail merge, merge tables

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Merge All Cells in a Table via Macro Macro for merging cells in a word table dana_c_83 Word VBA 3 04-29-2020 03:04 PM
Merge All Cells in a Table via Macro Merge table cells across columns but skip if column don't exist jhearing Word Tables 4 05-31-2016 06:20 AM
Merge All Cells in a Table via Macro Macro to split table cells nachiketapte Word VBA 10 03-08-2016 04:07 AM
Macro to loop through all cells in a table produced by a mail merge elh52 Word VBA 4 08-31-2014 10:50 PM
Merge All Cells in a Table via Macro Macro to Merge Cells Row By Row in a Table KD999 Word VBA 4 02-20-2012 08:51 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 04:51 AM.


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