Results 1 to 5 of 5
  1. #1
    4 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    559
    Thanks
    59
    Thanked 5 Times in 4 Posts

    Mail Merge If...Then...Else (2003)

    This code inserts the contents of MergefieldDOB if it exists, and "???" if it doesn't:

    { IF {MERGEFIELD DOB} > " " "{MERGEFIELD DOB}" "???" }

    Instead of the "???", I'd like it to insert a Tab character. I've tried different combinations of ^t in and out of quotes, but I can't get it to insert the Tab character.

    My source document is an Excel worksheet, and the DOB field is a date in the format 1/1/2005. I will soon be using an Access database for the source.

    Any suggestions?
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  2. Subscribe to our Windows Secrets Newsletter - It's Free!

    Get our unique weekly Newsletter with tips and techniques, how to's and critical updates on Windows 7, Windows 8, Windows XP, Firefox, Internet Explorer, Google, etc. Join our 480,000 subscribers!

    Excel 2013: The Missing Manual

    + Get this BONUS — free!

    Get the most of Excel! Learn about new features, basics of creating a new spreadsheet and using the infamous Ribbon in the first chapter of Excel 2013: The Missing Manual - Subscribe and download Chapter 1 for free!

  3. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Mail Merge If...Then...Else (2003)

    Simply delete the ??? and press the Tab key. If the Show/Hide button on the toolbar is on (down), you'll see an arrow character between the quotes; this is the tab character.

  4. #3
    4 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    559
    Thanks
    59
    Thanked 5 Times in 4 Posts

    Re: Mail Merge If...Then...Else (2003)

    It worked. Thanks!

    Some fine points for future reference:

    My stuff was inside a table, so I had to press Shift+Tab.

    The tab stop that the tab character tabs to has a dot leader, so instead of seeing a right arrow, I saw a bunch of dots. Interesting.
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

  5. #4
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 16 Times in 16 Posts

    Re: Mail Merge If...Then...Else (2003)

    I assume that you mean Ctrl+Tab, not Shift+Tab, for that would take you to the previous table cell.

  6. #5
    4 Star Lounger Lou Sander's Avatar
    Join Date
    Jun 2002
    Location
    Pittsburgh, PA
    Posts
    559
    Thanks
    59
    Thanked 5 Times in 4 Posts

    Re: Mail Merge If...Then...Else (2003)

    Yeah, I think so. Shift+Tab didn't look quite right when I wrote it in the post, but it wasn't convenient to go back and check. (Still isn't, but you know your stuff, and I'm pretty sure that Shift was wrong). <img src=/S/confused.gif border=0 alt=confused width=15 height=20>
    Lou Sander
    Pittsburgh, Pennsylvania
    USA

Posting Permissions

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