ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   outlook email body formatting issues from excel vba (https://www.excelbanter.com/excel-programming/414836-outlook-email-body-formatting-issues-excel-vba.html)

mr rapidan

outlook email body formatting issues from excel vba
 
Hi, my name's Kyle.

I'm sending email from Excel VBA for the first time. I've got
everything working just fine and dandy - emails are going where I want
them, with attachments when I want them, but the formatted text
strings (multiple lines of dates, numbers, and text) that I want in
the email body are getting screwed up.

I need a fixed space font to get things lined up.

First, when I was just using .body, the text was showing up in the
resulting email in a proportional font.

So, I figured out that .htmlbody was the way to go, but I'm flailing
around - I've managed to specify a fixed space font, but the spaces
are getting stripped out of my formatted text strings! Is there a way
to prevent my spaces from getting stripped out?

Can someone please help!?

Kyle
Lehigh Valley, PA

mr rapidan

outlook email body formatting issues from excel vba
 
On Jul 29, 10:28*pm, mr rapidan wrote:
Hi, my name's Kyle.

I'm sending email from Excel VBA for the first time. *I've got
everything working just fine and dandy - emails are going where I want
them, with attachments when I want them, but the formatted text
strings (multiple lines of dates, numbers, and text) that I want in
the email body are getting screwed up.

I need a fixed space font to get things lined up.

First, when I was just using .body, the text was showing up in the
resulting email in a proportional font.

So, I figured out that .htmlbody was the way to go, but I'm flailing
around - I've managed to specify a fixed space font, but the spaces
are getting stripped out of my formatted text strings! *Is there a way
to prevent my spaces from getting stripped out?

Can someone please help!?

Kyle
Lehigh Valley, PA


Solved my own problem.

Used Dick's Clicks RangeToHTML function to put the range I was trying
to email into HTML, and sent that in .htmlbody.

I don't understand what's happening, at all, but it works, and that's
what counts at this point in the evening!


All times are GMT +1. The time now is 03:02 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
ExcelBanter.com