Results 1 to 6 of 6
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Control Mail Message font (Access XP, Windows XP SP2)

    I am using a "createmail" function (gleaned from the Lounge, Thank You!) that invokes an instance of outlook and sends out email. This is working well, but these particular emails must go out with a "fixed width" type font, such as "Courier New". Most users are using the Outlook default font "Arial", and have to switch back and forth in order to use this database and make the emails format properly.

    Is there any way, through code, to temporarily control the Outlook font without manually changing it within the Options in outlook? I have searched the Outlook class library and can't seem to find anything that would help, but I'm not all that sharp with controlling other software outside of Access.

  2. #2
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Control Mail Message font (Access XP, Windows XP SP2)

    You could set the BodyFormat property of the MailMessage object that your code creates to olFormatPlain. This will change the e-mail message to a plain text message; in general this uses a fixed-width font.

    If you want to change the font in a HTML format message, you can set the HTMLBody property instead of the Body property. You'd have to produce the HTML code for the message complete with all formatting tags.

  3. #3
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Mail Message font (Access XP, Windows XP SP2)

    Thanks so much, Hans. Sound like it would probably work, but as I said, I am somewhat "Code Challenged". Could I get an example of how to do that? I am so sorry to bother you again, I've hacked around and couldn't figure out how to do that.

  4. #4
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Mail Message font (Access XP, Windows XP SP2)

    Im sorry, I was talking about using tyhe "Plain Text" moethod, not HTML......

  5. #5
    Plutonium Lounger
    Join Date
    Mar 2002
    Posts
    84,353
    Thanks
    0
    Thanked 29 Times in 29 Posts

    Re: Control Mail Message font (Access XP, Windows XP SP2)

    Without knowing what code you already have, it's hard to give specific advice. Let's say you have a variable objMessage that represents the e-mail message. The instruction

    objMessage.BodyFormat = olFormatPlain

    will change the message to plain text. If that doesn't help, please post the relevant part of the code you're using.

  6. #6
    Lounger
    Join Date
    Jan 2001
    Location
    Sacramento, California, USA
    Posts
    34
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Control Mail Message font (Access XP, Windows XP SP2)

    Thank you SO MUCH Hans...as always, you go above and beyond!

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •