Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 05-08-2021, 01:42 PM
Ozzyy Ozzyy is offline Suppressing Blank Conditional Sections in Mail Merge Windows 10 Suppressing Blank Conditional Sections in Mail Merge Office 2019
Novice
Suppressing Blank Conditional Sections in Mail Merge
 
Join Date: May 2021
Posts: 2
Ozzyy is on a distinguished road
Default Suppressing Blank Conditional Sections in Mail Merge

Hello -

I am working on an Excel to Word mail merge that creates employee salary increase letters. I have a few conditional sections in the mail merge document that are working correctly, but I'm having a formatting challenge.

If the section is blank/not applicable for an employee, I would like it to skip over that section entirely in the document, not showing any blank spaces. Instead what I'm seeing are blank line that I'm unable to suppress. I've done some reading and tried using \b and \f switches but haven't had any luck as yet.



Below is a sample of the document. The bolded section is an example of the section that I'd like skipped over entirely, without leaving blank spaces, if someone is not eligible for a salary increase.

---
STATIC TEXT HERE


{ if { MERGEFIELD Salary_Increase_Pct }="0.00%" "Your salary will remain the same at this time." "We are pleased to increase your annual salary by { MERGEFIELD Salary_Increase_Pct } to { MERGEFIELD Proposed_Salary }. This change will be effective from { MERGEFIELD Salary_Inc_Eff_Date }. You will receive the adjustment on your { MERGEFIELD Salary_Inc_Payroll_Period } payroll."}


STATIC TEXT HERE
---

Any help would be greatly appreciated - thank you!
Reply With Quote
  #2  
Old 05-08-2021, 02:32 PM
macropod's Avatar
macropod macropod is offline Suppressing Blank Conditional Sections in Mail Merge Windows 10 Suppressing Blank Conditional Sections in Mail Merge Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,225
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Presumably, with Word's formatting display switched on, what you have is:
Quote:
STATIC TEXT HERE¶
{ if { MERGEFIELD Salary_Increase_Pct }="0.00%" "Your salary will remain the same at this time." "We are pleased to increase your annual salary by { MERGEFIELD Salary_Increase_Pct } to { MERGEFIELD Proposed_Salary }. This change will be effective from { MERGEFIELD Salary_Inc_Eff_Date }. You will receive the adjustment on your { MERGEFIELD Salary_Inc_Payroll_Period } payroll."}
STATIC TEXT HERE¶
What you need is:
Quote:
STATIC TEXT HERE¶
{ if { MERGEFIELD Salary_Increase_Pct }="0.00%" "Your salary will remain the same at this time." "We are pleased to increase your annual salary by { MERGEFIELD Salary_Increase_Pct } to { MERGEFIELD Proposed_Salary }. This change will be effective from { MERGEFIELD Salary_Inc_Eff_Date }. You will receive the adjustment on your { MERGEFIELD Salary_Inc_Payroll_Period } payroll.
"}STATIC TEXT HERE¶
__________________
Cheers,
Paul Edstein
[Fmr MS MVP - Word]
Reply With Quote
  #3  
Old 05-08-2021, 02:39 PM
macropod's Avatar
macropod macropod is offline Suppressing Blank Conditional Sections in Mail Merge Windows 10 Suppressing Blank Conditional Sections in Mail Merge Office 2016
Administrator
 
Join Date: Dec 2010
Location: Canberra, Australia
Posts: 21,225
macropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant futuremacropod has a brilliant future
Default

Cross-posted at: Suppressing Blank Conditional Sections in Mail Merge
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
  #4  
Old 05-08-2021, 04:31 PM
Ozzyy Ozzyy is offline Suppressing Blank Conditional Sections in Mail Merge Windows 10 Suppressing Blank Conditional Sections in Mail Merge Office 2019
Novice
Suppressing Blank Conditional Sections in Mail Merge
 
Join Date: May 2021
Posts: 2
Ozzyy is on a distinguished road
Default

This did the trick! Thank you so much, Paul; very much appreciated.
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Suppressing Blank Conditional Sections in Mail Merge Need help suppressing information in a table in a mail merge Laura123 Mail Merge 1 12-04-2017 01:34 PM
Suppressing Blank Conditional Sections in Mail Merge Conditional Text without Mail Merge wvdh Word 3 10-05-2017 02:38 AM
I know nothing about mail merge, but need help with conditional statements briyosa Word 1 03-27-2017 10:17 PM
Mail merge in sections with address list patrickpetersen Mail Merge 1 02-18-2015 10:57 PM
Suppressing Blank Conditional Sections in Mail Merge Conditional merge fields in mail merge Aude Mail Merge 1 01-06-2012 07:38 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 11:49 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2021, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2021 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft