+ Reply to Thread
Results 1 to 2 of 2

Suppressing Blank Conditional Sections in Mail Merge

  1. #1
    Registered User
    Join Date
    05-08-2021
    Location
    Canada
    MS-Off Ver
    Office 365
    Posts
    1

    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!

  2. #2
    Forum Expert macropod's Avatar
    Join Date
    12-22-2011
    Location
    Canberra, Australia
    MS-Off Ver
    Word, Excel & Powerpoint 2003 & 2010
    Posts
    3,726

    Re: Suppressing Blank Conditional Sections in Mail Merge

    Cross-posted (and answered) at: https://www.msofficeforums.com/mail-...tml#post159694
    Please read Excel Forum's Cross-Posting policy in rule 8: http://www.excelforum.com/forum-rule...rum-rules.html
    Cheers,
    Paul Edstein
    [Fmr MS MVP - Word]

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Similar Threads

  1. Mail Merge - Create separate Mail merge pdf for each sheets of an excel file
    By sureshbvs in forum Excel Programming / VBA / Macros
    Replies: 1
    Last Post: 03-13-2021, 12:38 PM
  2. Mail Merge - Blank Spaces
    By kamccar in forum Excel General
    Replies: 0
    Last Post: 09-05-2019, 02:05 PM
  3. [SOLVED] Conditional formatting a mail merge
    By pykywannabe in forum Excel General
    Replies: 2
    Last Post: 04-22-2016, 11:21 AM
  4. Replies: 0
    Last Post: 01-05-2015, 07:35 AM
  5. Intentional blank spaces being removed during mail merge
    By birdablaze in forum Word Formatting & General
    Replies: 15
    Last Post: 12-23-2014, 10:30 AM
  6. [SOLVED] Transpose Mail Merge (Row to Column) based on Blank Cell
    By jfsportz in forum Excel General
    Replies: 3
    Last Post: 08-19-2012, 07:09 AM
  7. Replies: 2
    Last Post: 07-12-2012, 08:11 PM

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1