Consulting

Results 1 to 6 of 6

Thread: Email Priority

  1. #1
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location

    Email Priority

    I have the code below, i know i can set the priority(high, medium, low ) in outlook but not sure how to do it from this macro, can I also generate a receipt as well from this macro when they have received or read the email message?

    Private Sub btnEmail_Click()
    'Variable declaration
        Dim oApp As Object, _
        oMail As Object
    'Create and show the outlook mail item
        Set oApp = CreateObject("Outlook.Application")
        Set oMail = oApp.CreateItem(0)
        With oMail
             'Uncomment the line below to hard code a recipient
            .To = ""
             'Uncomment the line below to hard code a subject
            .Subject = "Subject"
             'use .Display to just show the mail
             .Body = "Body"
            .Display
        End With
    Set oMail = Nothing
        Set oApp = Nothing
    Many Thanks

    Gibbo

  2. #2
    Knowledge Base Approver
    Space Cadet
    VBAX Tutor sandam's Avatar
    Joined
    Jan 2005
    Location
    London
    Posts
    292
    Location
    This should work for ya


    .Importance = olImportanceNormal
    'Then just change it to either olImportanceLow, or
    'olImportanceHigh for your preference

    [edit]

    As for the receipt, not sure. Have you checked the Kb. I know that a lot of the email stuff I worked on a while ago, I got out of there.

    [/edit]
    Nothing annoys a non-conformist more than other non-conformists who refuse to conform to the rules of non-conformity.


    Confused is my normal state of mind


  3. #3
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location
    many thanks, that works for me, just need the other bit now

    cheers

    Gibbo

  4. #4
    Knowledge Base Approver VBAX Expert brettdj's Avatar
    Joined
    May 2004
    Location
    Melbourne
    Posts
    649
    Location
    Gibbo,

    I suggest that you set a reference to the Outlook object via Tools - Reference in the VBE. You can then scan the properties of the mailitem using intellisense


    Private Sub btnEmail_Click()
    'Variable declaration
    Dim oApp As Outlook.Application, _
    oMail As Outlook.MailItem
    'Create and show the outlook mail item
    Set oApp = New Outlook.Application
    Set oMail = oApp.CreateItem(0)
    With oMail
    'Uncomment the line below to hard code a recipient
    .To = ""
    'Uncomment the line below to hard code a subject
    .Subject = "Subject"
    'use .Display to just show the mail
    .Body = "Body"
    .Importance = olImportanceNormal
    .ReadReceiptRequested = True
    .Display
    End With
    Set oMail = Nothing
    Set oApp = Nothing
    End Sub


    Cheers

    Dave

  5. #5
    VBAX Expert
    Joined
    Jan 2005
    Posts
    574
    Location
    thanks Dave much appreciated

  6. #6
    Knowledge Base Approver
    Space Cadet VBAX Tutor sandam's Avatar
    Joined
    Jan 2005
    Location
    London
    Posts
    292
    Location
    ahhh. i kept on looking for just ReadReceipt. Good one brettdj . I'll keep that one in mind myself
    Nothing annoys a non-conformist more than other non-conformists who refuse to conform to the rules of non-conformity.


    Confused is my normal state of mind


Posting Permissions

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