Hello,
I have a macro which scrapes data from a mainframe emulation program called Attachmate Reflection into Excel to make various calculations for sales people. I have to scrape sales information for each salesman and send it to them in an email.
My problem is that once the screen information is in a variable (strScreenCapture), all extra spacing is removed. The page where I get my information is set up as a table and so it is important that the string retain extra spaces so the salesmen can correctly view their information.
In order to keep the spacing as it should be, I changed the font to Consolas. To do this, I use the following snippet:
I put my strScreenCapture variable into a message box to see its contents - the spaces were retained, however whenever I use HTML, it seems to cut the spaces. Does anyone have any way to correct this?
Thanks
I have a macro which scrapes data from a mainframe emulation program called Attachmate Reflection into Excel to make various calculations for sales people. I have to scrape sales information for each salesman and send it to them in an email.
My problem is that once the screen information is in a variable (strScreenCapture), all extra spacing is removed. The page where I get my information is set up as a table and so it is important that the string retain extra spaces so the salesmen can correctly view their information.
In order to keep the spacing as it should be, I changed the font to Consolas. To do this, I use the following snippet:
Code:
With OutMail
.To = strUser
.Subject = "Your sales information for the week ending on " + strDate
.htmlBody = "<p>Hello,,</p>" & _
"<p>Here is your sales information the week ending on " & strDate & ".</p>" & _
"<span style='font-family:consolas;font-size:11'>" & [highlight #FCE94F]strScreenCapture[/highlight] & "</span>"
.Display
End With
I put my strScreenCapture variable into a message box to see its contents - the spaces were retained, however whenever I use HTML, it seems to cut the spaces. Does anyone have any way to correct this?
Thanks