vbaoutlookwindows-10outlook-2013

Can one insert a collapsible list in an outlook email?


Is it possible to insert collapsible text in an Outlook email ?

[+] header name When the reader clicks the [+] he will expand the text.

Tried these methods

  1. Making collapsible text without Java and attaching as text. Imports fine into an outlook email. But expansion doesn't work.

  2. Tried with Outlook VBA. Works fine with the .docm format outside of Outlook in Word. But doesn't work in Outlook.


Solution

  • H Mayan,

    This can't be done in Outlook as it does not support the CSS required.

    You can implement the practice of progressive enhancement whereby you code a CSS-only solution like this:

    #toggle {
      display: none;
      font-size:14px;
    }
    #toggle:target {
      display: block;
    }
    #toggle:target + .close {
      display: block;
    }
    .close {
      display: none;
    }
    <a href="#toggle">REVEAL +</a>
    <p id="toggle">Lorem ipsum dolor sit amet, consectetur adipiscing elit.</p>
    
    <a href="#" class="close">HIDE -</span>

    And then use a media query, usually @media screen and (max-width:480px) to show/hide on supported devices and mso conditional css to give a simple fallback for Outlook.