+ Reply to Thread
Results 1 to 5 of 5

Thread: Outlook email from Excel VBA - message format & importance

  1. #1
    Registered User
    Join Date
    01-10-2011
    Location
    Kent, England
    MS-Off Ver
    Excel 2007 & Excel 2003
    Posts
    21

    Outlook email from Excel VBA - message format & importance

    Hi there,

    I already use Excel VBA to send emails via Outlook. I need to specify that the email format should be plain text (rather than html or rtf), and that the importance should be "high". Can anyone point me to the tabs / commands / whatever that I need to add to the VBA code in order to do this, please?

    I had a look at Ron de Bruin's page but I couldn't see anything on these commands.

    Any assistance would be appreciated - thanks!

    ssu95bm
    Last edited by ssu95bm; 02-08-2012 at 09:34 AM.

  2. #2
    Valued Forum Contributor Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds/Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    1,031

    Re: Outlook email from Excel VBA - message format & importance

    Like this:
    With CreateObject("Outlook.Application").Createitem(0)
        .importance = 2
        .body = "your text body"
        .bodyformat = 1
        .display
    End With
    Click the * below to say thanks

    Girls sleep with guys who use photoshop, but marry the ones who work with Excel

    Corduroy
    pillows: They're making headlines!

    Did you mean: recursion
    http://www.google.com/search?hl=en&q=recursion

  3. #3
    Forum Guru snb's Avatar
    Join Date
    05-09-2010
    Location
    VBA
    MS-Off Ver
    Redhat
    Posts
    5,151

    Re: Outlook email from Excel VBA - message format & importance

    If you don't use htmlbody, the email will by default contain plain text.



  4. #4
    Valued Forum Contributor Kyle123's Avatar
    Join Date
    03-10-2010
    Location
    Leeds/Sheffield, England
    MS-Off Ver
    Excel 2003
    Posts
    1,031

    Re: Outlook email from Excel VBA - message format & importance

    @snb mine doesn't, all my emails are set up as HTML as default
    Click the * below to say thanks

    Girls sleep with guys who use photoshop, but marry the ones who work with Excel

    Corduroy
    pillows: They're making headlines!

    Did you mean: recursion
    http://www.google.com/search?hl=en&q=recursion

  5. #5
    Registered User
    Join Date
    01-10-2011
    Location
    Kent, England
    MS-Off Ver
    Excel 2007 & Excel 2003
    Posts
    21

    Re: Outlook email from Excel VBA - message format & importance

    Thanks everyone, using the following as suggested has worked a treat!

    .importance = 2
    .bodyformat = 1
    Cheers,
    ssu95bm

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Tags for this Thread

Bookmarks

Posting Permissions

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

Search Engine Friendly URLs by vBSEO 3.2.0