Tuesday, April 17, 2007

Converting Messages to Text in Outlook 2007

In Outlook 2003, you could open an email message and convert it from HTML to text by hitting Ctrl-Shift-O. That was handy, because I generally prefer to bottom-quote, and that's a pain in the ass when the email is HTML. So when I installed Outlook 2007 I was annoyed that Ctrl-Shift-O didn't work any more.

 

After a bunch of fumbling around, I finally discovered that if you open a message and edit it (Message->Other Actions->Edit), you can then change it to plain text (Options->Plain text). Well, being a keyboard guy, I got pretty tired of doing that, so now I have the following key sequence committed to muscle memory:

 

Enter (open message)

Alt H X E (edit message)

Alt P L (convert to plain text)

Alt H R P (reply)

 

Which, honestly, sucks, but is maybe 100 times as fast as doing the same thing with the mouse.

22 comments:

  1. You can add Edit and Plain Text to the quick edit toolbar, which would at least shorten it to Alt-6, Alt-7.



    No doubt you could go all the way and make a macro command that does the whole thing in one shot.

    ReplyDelete
  2. I looked briefly at writing a macro, but with no "record macro", I gave up. :)

    ReplyDelete
  3. How about this (hopefully the formatting isn't too whacked):

    Sub ChangeBodyToPlainText()

    Dim item As Object

    Dim selectedItems As Object

    Dim outlookApp As New Outlook.Application

    Dim outlookExp As Outlook.Explorer

    Dim outlookSel As Outlook.Selection



    On Error Resume Next



    Set outlookExp = outlookApp.ActiveExplorer

    Set selectedItems = outlookExp.Selection



    For Each item In selectedItems

    If (item Is MailItem) Then

    item.BodyFormat = OlBodyFormat.olFormatPlain

    item.Save

    End If

    Next



    Set selectedItems = Nothing

    Set item = Nothing



    End Sub





    ReplyDelete
  4. Good ol' Kevin. Sometimes I wonder why I bother to code at all - I could just post specs here and charge my clients. :)



    Thanks!

    ReplyDelete
  5. So, of course it works beautifully, but now I have no idea how to bind it to a keystroke...

    ReplyDelete
  6. As long as I get a piece of that action. :P



    The only way that I know to get a kbd shortcut is to add the macro to a toolbar and set a unique mnemonic on it.



    Tools/Customize

    Macros category

    Choose macro, drag it to a toolbar

    Right click on it, rename it and use "&" to assign the mnemonic (e.g. name it '&Plain Text' - then Alt-P should trigger it).



    Strange that Outlook doesn't seem to let you bind hotkeys like Ctrl-Alt-O to macros. At least that I've been able to find.



    ReplyDelete
  7. Perhaps I'm missing something, as I never actually do the thing you're trying to do here, but it seems like it doesn't need to be anything like this complex.



    I just tried adding a Command Bar shortcut to the "Plain text" command. (This is the command bar on the message editing window, rather than the message reading window, or the main window.)



    So now, if I want to reply and convert to plain text, its:



    Ctrl+R (Reply)

    Alt+6 (Convert to plain text)



    ...the '6' because this happens to be item number 6 on my command bar. Replace that with wherever it ends up on yours.



    Since you presumably needed to do the Ctrl+R thing before if you were replying, this seems like fewer keystrokes than Outlook 2003. And no need for a macro.

    ReplyDelete
  8. What's the command bar? And how do I add a shortcut?

    ReplyDelete
  9. It's the thing at the top left of most windows in Office 2007. (Except the main Outlook window. But it's present on the window for composing mail.)



    There's a drop down menu button from which you can customize the thing.



    ReplyDelete
  10. OK, thanks. However, I tried that, and it doesn't quite do what I want. Here's why:



    1. It does indeed let me convert a reply to plain text. But I want to convert the original message to plain text, because that's what gives me the chevrons at the beginning of the line so I can quote in the manner to which I am accustomed.



    2. If I add this button to the message window itself, it is greyed out. I.e. unavailable.



    3. I haven't been able to figure out how to add Kevin's macro to the command bar, either: it doesn't appear when I select "macros".



    So I'm still not happy.

    ReplyDelete
  11. I'm using this same code, but wondered why if you use the "Edit Message" technique I get a 136k message to 12k, but if I just convert using this macro the message goes to 124k. Is there a way to actually use the "Edit Message" technique in the macro?

    ReplyDelete
  12. You could also try always viewing and sending with plain text.. I think it would do the same exact thing as it always converts HTML mail to plain text when you hit reply (and includes the chevrons if you have your reply options set to use them).



    Always read mail as Plain Text: Tools, Trust Center, E-Mail security - and Check 'Read all standard mail in plain text'



    Alway send using Plain Text: Tools, Options, Format tab - set 'Compose in this format' to 'Plain Text'

    ReplyDelete
  13. Fab.



    Trust Center held the key for me.



    Many thanks 'br0k'





    Mac

    ReplyDelete
  14. In a new mail message, customise the Quick Access Toolbar (right click on the toolbar at the very top of the form, the one with the Save icon).

    From the drop down, choose Popular Commands then Plain Text. Click the Add>> button to copy it to the Quick Access toolbar.

    You can click this button whenever you wish to send a plain text email.

    ReplyDelete
  15. Does that just help me compose new messages in plain text? Because that's fairly easy. What I want is to convert existing messages to plaintext while I'm replying to them. Also, I don't really like to use the mouse - even the key sequence I describe above is faster than taking my hands off the keyboard to click something.

    ReplyDelete
  16. Just do what br0k said above, then *restart Outlook*, and you will read and reply to all of your messages in plain text automagically, like a sane person.

    ReplyDelete
  17. Yeah. except you now can't read html mail.

    ReplyDelete
  18. You can still read html mail Kai, when the message is opened there's a little "this mail was converted to plain text" box near the top of the mail window which you can click to view the mail as html again.

    ReplyDelete
  19. KEYBOARD SHORTCUTS
    CTRL-1 Switch to Email view
    CTRL-2 Switch to Calendar View
    CTRL-3 Switch to Contacts View
    CTRL-4 Switch to Tasks View
    CTRL-6 Switch to Folder List in Navigation Pane.

    CTRL-F12 Marks the message as ‘Social’ category and puts it in another colour. [To set it, go Categorise > All Categories and set a button]

    When viewing a message:
    Alt H Accesses the menubar
    Thus Alt H X E (edit message)
    Alt P L (convert to plain text)

    Quick Access Toolbar
    It is also possible to add items to the ‘Quick Access Toolbar’. Right-click on the menubar and go to “Customise Quick Access Toolbar”.
    Use the ‘All Commands’ Dropdown. Select all the items you want. I’ve chosen:
    1 Edit Message
    2 Plain Text
    3 HTML
    4 Rich Text
    5 Message Options (allows you to see the email address of exactly who sent you the message if its not automatically shown)
    6 Superscript
    7 Subscript
    8 Convert Text To Table
    9 Convert Table to Text
    09 Clipart
    etc…

    You can then access each menu item simply by clicking ALT and the number.

    ReplyDelete
  20. http://office.microsoft.com/en-us/outlook/HP052426891033.aspx

    http://support.microsoft.com/kb/831607

    Between these you can easily make all incoming and outgoing email in plain text, with no other programming.

    ReplyDelete
  21. Thanks for the links. I solved all my problems with Outlook about two years ago by not using it any more. :)

    ReplyDelete
  22. I've been pounding my desk since IT upgraded me to Office 2007 last week. This page was finally a life-saver.

    Thanks.

    ReplyDelete