When I copy and paste this Excel range
into an Outlook email, it doesn’t look so good.
I thought I would use JoinRange to put some tabs in between the text. I used a function like this
A tab is ASCII code 9. It will show up as squares in Excel
but will turn into real tabs in Outlook
Still looks bad and now there’s quotes around everything. I didn’t know the ASCII code for tabs, so employed my usual technique for finding out. I get some words in a cell that contain the character I want, then use a formula to see what’s what.
The formula in G10 (text is in F10) is
=CODE(MID($F$10,ROW()-9,1)). I fill that down and see the ASCII codes for all the characters. Sadly, I didn’t know how to type a tab in an Excel cell. Tabbing takes me to the next cell rather than inserting a tab character. So I resorted to VBA. From the Immediate Window
which is really dumb. As long as I’m in the Immediate Window, I could just use
?asc(vbtab), which returns 9. Is there a way to get a tab into a cell without knowing the ASCII code? I mean other than the way I did it.
While I was putting this post together, I discovered something. I write all my email in plain text rather than HTML. I don’t have Hello Kitty stationary or a need to put an image of my business card in my signature, so plain text works the best for me. I assumed that pasted range would look better in an HTML email.
Format email as HTML, then paste
Paste range, then format email as HTML
And the winner is: Paste range, format email as HTML, change format of email back to plain text