Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 11-10-2024, 07:11 PM
Care29 Care29 is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Novice
Mail Merge for ID
 
Join Date: Nov 2024
Posts: 7
Care29 is on a distinguished road
Default Mail Merge for ID

Good day!

I am hoping somebody can help with my mail merge inquiry. I am trying to print IDs using MS Word. I separated the file for the front and back of the ID and there should be 3 sets of IDs per file.

The back part of the ID should be in a different order than the front. Please see the sample below.

1 2 3

6 5 4

I have seen one solved thread that used a macro, but it only worked for 2 columns. See the macro codes below for reference.

Code:
Sub MailMergeToDoc()
Application.ScreenUpdating = False
Dim Tbl As Table
ActiveDocument.MailMerge.Execute
For Each Tbl In ActiveDocument.Tables
  With Tbl
    .Columns(2).Select
    Selection.Copy
    .Columns(1).Select
    Selection.Paste
    .Columns(3).Delete
  End With
Next
Application.ScreenUpdating = True
End Sub
Thank you in advance.

Last edited by macropod; 11-11-2024 at 01:35 AM. Reason: Added code tags
Reply With Quote
  #2  
Old 11-11-2024, 01:39 AM
macropod's Avatar
macropod macropod is offline Mail Merge for ID Windows 10 Mail Merge for ID Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Please upload a copy of the document you want to modify. You can 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
  #3  
Old 11-11-2024, 02:00 AM
Care29 Care29 is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Novice
Mail Merge for ID
 
Join Date: Nov 2024
Posts: 7
Care29 is on a distinguished road
Default

Thank you for your reply. As instructed, please see the attached files. The ID Template - Back file has a Macro code which I saw from another thread.
Attached Files
File Type: docx ID Template - Front.docx (56.8 KB, 5 views)
File Type: docm ID Template - Back.docm (48.3 KB, 6 views)
File Type: xlsx Master file.xlsx (10.0 KB, 4 views)
Reply With Quote
  #4  
Old 11-11-2024, 04:37 AM
macropod's Avatar
macropod macropod is offline Mail Merge for ID Windows 10 Mail Merge for ID Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Your documents won't work as required.

For starters, your 'front' document doesn't even contain a table - just masses of textboxes in three groups. And, although your 'back' document contains a three-column table, it, too, contains textboxes in each cell.

You need to remove all textboxes and manage the content layout within each cell. Also, for a label merge, all you need do is get the layout correct in the first cell, then use 'Update Labels' to propagate the layout to the remaining cells.

Are you using a particular label product supported by Word for this? If so, what is it?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 11-11-2024, 08:06 PM
Care29 Care29 is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Novice
Mail Merge for ID
 
Join Date: Nov 2024
Posts: 7
Care29 is on a distinguished road
Default

Hi!

I just make the 'Front' file as is with labels since it work with the 'Next Record' rule to populate other IDs with the other person's data. For the 'Back' file, I have attached the file with no textbox.

My concern is if I print out these two files, the data of the 'Back' file will not mirror what it should be of the 'Front' file.

if no Macro it will be, Front - 1 2 3
Back - 3 2 1

with the current macro, it's Front - 1 2 3
Back - 1 2 1

What I want is, Front - 1 2 3
Back - 1 2 3

And I'm not using any particular label product supported by Word.

I hope I explained everything clearly.
Attached Files
File Type: docm ID Template - Back.docm (44.3 KB, 3 views)
Reply With Quote
  #6  
Old 11-11-2024, 08:25 PM
macropod's Avatar
macropod macropod is offline Mail Merge for ID Windows 10 Mail Merge for ID Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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

Both files need to use a table, not textboxes.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 11-11-2024, 10:58 PM
Care29 Care29 is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Novice
Mail Merge for ID
 
Join Date: Nov 2024
Posts: 7
Care29 is on a distinguished road
Default

Here you go, I'm sending them all 3 files again. Don't mind the format. I'll format it again once everything's worked out. Thank you again
Attached Files
File Type: docx ID Template - Front.docx (24.3 KB, 3 views)
File Type: docm ID Template - Back.docm (36.9 KB, 3 views)
File Type: xlsx Master file.xlsx (10.0 KB, 3 views)
Reply With Quote
  #8  
Old 11-12-2024, 09:54 AM
Charles Kenyon Charles Kenyon is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Moderator
 
Join Date: Mar 2012
Location: Sun Prairie, Wisconsin
Posts: 9,533
Charles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant futureCharles Kenyon has a brilliant future
Default

I expect that you will find this easier if you use one of the Word label setups.
Labels, in Word are tables formatted to match commercial formats.
Reply With Quote
  #9  
Old 11-12-2024, 04:11 PM
macropod's Avatar
macropod macropod is offline Mail Merge for ID Windows 10 Mail Merge for ID Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 simplest way of dealing with your problem is to use 'Legal' size stationery, with three paired labels per page, with each pair generating both sides of the label.

See attached.

The result is achieved by nesting a second two-row table in the cells of the main table and changing the text orientation. The mailmerge is done as a label merge.
Attached Files
File Type: docx ID Labels Mailmerge.docx (18.7 KB, 3 views)
File Type: docx ID Labels Output.docx (18.8 KB, 3 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 11-12-2024, 07:09 PM
Care29 Care29 is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Novice
Mail Merge for ID
 
Join Date: Nov 2024
Posts: 7
Care29 is on a distinguished road
Default

Thank you for this. But if I use it, I will have to cut and separate the front and back of the ID, paste them back to back, and then laminate them. Is there a Macro that can make it work with 3 IDs per sheet? It worked with 2 per sheet so I was hoping there's also a workaround to make it work with 3 per sheet.
Reply With Quote
  #11  
Old 11-12-2024, 08:12 PM
macropod's Avatar
macropod macropod is offline Mail Merge for ID Windows 10 Mail Merge for ID Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 22,467
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 won't need to cut & paste anything. All you'll need to do is fold each front/back pair down the middle then laminate. You can even use the table tools to change the text direction for one side of the label in the mailmerge main document, if you like. Much less work and far more reliable than messing around with front & back mailmerges, remembering which way up & around to feed the first print into the printer, having to worry about whether the front & back align properly when printed, etc.

But, if you're absolutely wedded to using a macro:
Code:
Sub MailMergeToDoc()
Application.ScreenUpdating = False
Dim Tbl As Table, Rng As Range, c As Long
ActiveDocument.MailMerge.Execute
For Each Tbl In ActiveDocument.Tables
  With Tbl
    For c = .Columns.Count - 1 To 1 Step -1
    .Columns.Add
    Set Rng = .Columns(c).Cells(1).Range
    Rng.End = Rng.End - 1
    .Columns.Last.Cells(1).Range.FormattedText = Rng.FormattedText
    .Columns(c).Delete
    Next
  End With
Next
Application.ScreenUpdating = True
End Sub
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #12  
Old 11-12-2024, 11:00 PM
Care29 Care29 is offline Mail Merge for ID Windows 11 Mail Merge for ID Office 2021
Novice
Mail Merge for ID
 
Join Date: Nov 2024
Posts: 7
Care29 is on a distinguished road
Default

WOWWW! The below code worked as required! Thank you! Cut and Paste or folding is out of my choices since I will be using thicker paper. So combining sheets will just add up to the thickness.

THANK YOU VERY MUCH!
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
Mail Merge for ID Is there a way to do a mail merge type of addition of data after a mail merge has been done? mtandino Word 4 06-01-2021 02:00 PM
Mail Merge for ID Mail Merge - Create seperate Mail merge pdf for each sheets of an excel file sureshbvs Word VBA 1 03-12-2021 05:42 AM
Mail Merge for ID Mail Merge with Fields extracted from ROWS instead of COLUMNS or transpose of typical mail merge djrexy Mail Merge 1 05-20-2020 04:04 PM
Update & Unlink Specific Merge Field in Word Doc from Mail Merge - Excel VBA RMerckling Mail Merge 16 05-17-2018 05:19 PM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 05:08 AM.


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