View Single Post
 
Old 05-08-2021, 01:42 PM
Ozzyy Ozzyy is offline Windows 10 Office 2019
Novice
 
Join Date: May 2021
Posts: 4
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