Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 06-30-2025, 03:54 AM
Barattolo_67 Barattolo_67 is offline Mail Merge Outputs one Row with the Field Names Windows 11 Mail Merge Outputs one Row with the Field Names Office 2021
Novice
Mail Merge Outputs one Row with the Field Names
 
Join Date: Jan 2022
Posts: 5
Barattolo_67 is on a distinguished road
Default Mail Merge Outputs one Row with the Field Names

The mail merge code in the attached file ("Low Risk Recommendations.dotx") works but for some of the fields, it adds two rows into the table with the field names (see the two lines in orange in the file "Low Risk Recommendations.docx" which should not be there).

I have wracked my brain over it but cannot figure it out. Any help will be appreciated.
Attached Files
File Type: dotx Low Risk Recommendations.dotx (94.2 KB, 2 views)
File Type: docx Low Risk Recommendations.docx (96.6 KB, 2 views)
Reply With Quote
  #2  
Old 06-30-2025, 05:01 PM
macropod's Avatar
macropod macropod is offline Mail Merge Outputs one Row with the Field Names Windows 10 Mail Merge Outputs one Row with the Field Names 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're getting the extra rows because you aren't testing whether the 'observation' field is empty before outputting both the header rows and the empty 'observation' data.
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 06-30-2025, 11:41 PM
Barattolo_67 Barattolo_67 is offline Mail Merge Outputs one Row with the Field Names Windows 11 Mail Merge Outputs one Row with the Field Names Office 2021
Novice
Mail Merge Outputs one Row with the Field Names
 
Join Date: Jan 2022
Posts: 5
Barattolo_67 is on a distinguished road
Default

Quote:
Originally Posted by macropod View Post
You're getting the extra rows because you aren't testing whether the 'observation' field is empty before outputting both the header rows and the empty 'observation' data.
Thank you for your reply. I’m not sure I understand in full what I should do to fix the issue.

Thank you and best regards.
Reply With Quote
  #4  
Old 07-01-2025, 12:18 AM
macropod's Avatar
macropod macropod is offline Mail Merge Outputs one Row with the Field Names Windows 10 Mail Merge Outputs one Row with the Field Names 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

See attached. Either - or maybe both - of the field constructions in the document might meet your needs.
Attached Files
File Type: docx Operationl Audits Report Template.docx (94.9 KB, 2 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #5  
Old 07-01-2025, 01:08 AM
Barattolo_67 Barattolo_67 is offline Mail Merge Outputs one Row with the Field Names Windows 11 Mail Merge Outputs one Row with the Field Names Office 2021
Novice
Mail Merge Outputs one Row with the Field Names
 
Join Date: Jan 2022
Posts: 5
Barattolo_67 is on a distinguished road
Default Unfortunately, it did not work.

Thanks for the reply. Unfortunately, none of the two proposed solutions has worked.
Reply With Quote
  #6  
Old 07-01-2025, 01:16 AM
macropod's Avatar
macropod macropod is offline Mail Merge Outputs one Row with the Field Names Windows 10 Mail Merge Outputs one Row with the Field Names 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

In what way?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #7  
Old 07-01-2025, 01:27 AM
Barattolo_67 Barattolo_67 is offline Mail Merge Outputs one Row with the Field Names Windows 11 Mail Merge Outputs one Row with the Field Names Office 2021
Novice
Mail Merge Outputs one Row with the Field Names
 
Join Date: Jan 2022
Posts: 5
Barattolo_67 is on a distinguished road
Default

Thanks. The line with the field names still appears.
Reply With Quote
  #8  
Old 07-01-2025, 01:33 AM
macropod's Avatar
macropod macropod is offline Mail Merge Outputs one Row with the Field Names Windows 10 Mail Merge Outputs one Row with the Field Names 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

Is there a reason for doing a Directory/Catalogue merge this way?

Can you post a sample data source (anonymized, of course)?
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #9  
Old 07-01-2025, 01:46 AM
macropod's Avatar
macropod macropod is offline Mail Merge Outputs one Row with the Field Names Windows 10 Mail Merge Outputs one Row with the Field Names 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

Try the attached.
Attached Files
File Type: docx Operationl Audits Report Template.docx (94.0 KB, 0 views)
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #10  
Old 07-01-2025, 07:21 AM
Barattolo_67 Barattolo_67 is offline Mail Merge Outputs one Row with the Field Names Windows 11 Mail Merge Outputs one Row with the Field Names Office 2021
Novice
Mail Merge Outputs one Row with the Field Names
 
Join Date: Jan 2022
Posts: 5
Barattolo_67 is on a distinguished road
Default

Thanks, I've figured it out. It was a problem with my dataset. I appreciate the time you have spent on this.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Excel/Word Mail Merge - Same Address...different names/Rows doucecool67 Mail Merge 1 05-31-2019 03:37 PM
Mail merge how to link mail merge field value to a column heading dsummers Mail Merge 1 05-08-2014 02:59 PM
Mail merge with Duplicate Names but Different Dollar Amounts bh24524 Mail Merge 27 03-24-2014 01:15 PM
Mail Merge Outputs one Row with the Field Names How to ignore a mail merge field if the field is blank redzan Mail Merge 1 05-16-2013 08:34 AM
Mail Merge Outputs one Row with the Field Names Mail merge with names in content richard82 Mail Merge 1 07-07-2011 11:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 10:33 PM.


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