A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Query re Outlook 2000 message formatting...



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 15th 07, 08:57 AM posted to microsoft.public.outlook.program_vba
D.R.
external usenet poster
 
Posts: 5
Default Query re Outlook 2000 message formatting...

Hi,

I'm using Outlook 2000, VBS.

Is there an easy way to send a message in plain text, i.e. mono-spaced? Or
to set the font of a new message? I've had a good search, and can see all
sorts of new options with Outlook 2007, but I'm stuck with Outlook 2000.

If I add text to .Body then the received message looks like RTF format, and
if I use the following:
ls_lines = Split( ls_text, vbCrlf )
ls_html = Join( ls_lines, "BR" )

Set lo_mail = lo_outlook.CreateItem( olMailItem )
lo_mail.Recipients.Add ls_to
lo_mail.Subject = ls_subject
lo_mail.Body = ""
lo_mail.Attachments.Add gs_txt_spec
lo_mail.HtmlBody = "htmlfont size=""2"" face=""Courier New, Arial"""
& ls_html & "/font/html"
lo_mail.Send

....then multiple spaces in the Html string are reduced to one space by
Outlook. I know that the string given to Outlook definitely has multiple
spaces. How do I stop Html or Outlook 2000 from reducing multiple spaces to
one space?

Or, better still, a way format a message as pure courier-new, no frills, so
that I can just add text to .Body and not have to use .HtmlBody at all.

Thanks,
Dave.


  #2  
Old September 15th 07, 01:32 PM posted to microsoft.public.outlook.program_vba
D.R.
external usenet poster
 
Posts: 5
Default Query re Outlook 2000 message formatting...

Found out, didn't need to split and rejoin with BR, instead just use the
PRE tag:

lo_mail.HtmlBody = "htmlpre" & ls_text & "/pre/html"



"D.R." wrote in message
...
Hi,

I'm using Outlook 2000, VBS.

Is there an easy way to send a message in plain text, i.e. mono-spaced?
Or to set the font of a new message? I've had a good search, and can see
all sorts of new options with Outlook 2007, but I'm stuck with Outlook
2000.

If I add text to .Body then the received message looks like RTF format,
and if I use the following:
ls_lines = Split( ls_text, vbCrlf )
ls_html = Join( ls_lines, "BR" )

Set lo_mail = lo_outlook.CreateItem( olMailItem )
lo_mail.Recipients.Add ls_to
lo_mail.Subject = ls_subject
lo_mail.Body = ""
lo_mail.Attachments.Add gs_txt_spec
lo_mail.HtmlBody = "htmlfont size=""2"" face=""Courier New,
Arial""" & ls_html & "/font/html"
lo_mail.Send

...then multiple spaces in the Html string are reduced to one space by
Outlook. I know that the string given to Outlook definitely has multiple
spaces. How do I stop Html or Outlook 2000 from reducing multiple spaces
to one space?

Or, better still, a way format a message as pure courier-new, no frills,
so that I can just add text to .Body and not have to use .HtmlBody at all.

Thanks,
Dave.



 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
OE6 message query.... shoil Outlook Express 1 January 24th 07 03:32 AM
Formatting Toolbar missing (not even selectable), MS Outlook 2000 William H. Blair Outlook - General Queries 1 June 7th 06 01:42 AM
Outlook 2000 contacts formatting when importing [email protected] Outlook - Using Contacts 3 April 12th 06 11:50 PM
Message rule query mikey Outlook Express 6 April 11th 06 07:12 PM
Outlook 2000 Calendar automatic formatting Lynn Outlook - Calandaring 2 February 21st 06 02:07 AM


All times are GMT +1. The time now is 05:04 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.