none
Why does Outlook think an email is type "olrepor"t? RRS feed

  • Question

  • Hi,

    I am trying to process an email using the Outlook object model in VBA. This is definitely and email. It is a bounce. Outlook classifies it as type olreport. Any ideas why, and how I can get it to recognize it as an email?

    Thank you.

    Thursday, May 10, 2012 5:04 AM

Answers

  • I can't answer that question. All I can say is you need to check anything in Inbox to see what type the item is, you cannot just assume it will be a mail item.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm
     
     
    "pmkdatabase" <=?utf-8?B?cG1rZGF0YWJhc2U=?=> wrote in message news:f17d2a69-0ea1-4b3c-a7ec-5fa51b53430f...

    Thanks. I have send on the revised code to the client to try as I cannot reproduce the problem.

    Can you explain the possible reasons why the same bounce, from the same SMTP server, to the same incorrect address was for weeks indeed an email, but now has changed to a report?


    Ken Slovak MVP - Outlook
    • Marked as answer by pmkdatabase Friday, May 11, 2012 2:30 PM
    Friday, May 11, 2012 2:05 PM
    Moderator

All replies

  • what exactly do you want to extract from that report? You could try changing its MessageClass to IPM.Note.
    Thursday, May 10, 2012 7:38 AM
  • I want to read the subject and body, then move it to another folder depending on the body content. Outlook may think it is a report, but it is a notification of an undeliverable email - an email itself.
    Thursday, May 10, 2012 8:30 AM
  • ok, try to change its message class
    Thursday, May 10, 2012 8:32 AM
  • ok, try to change its message class

    Thanks. I am trying, but winging it. This doesn't work:

        If myItem.MessageClass = olFolder Then myItem.MessageClass = IPM.Note

    Can you explain or point me to a sample of how to do it?

    Thursday, May 10, 2012 9:23 AM
  • folder? i thought that you wanted to change item type of report item in outlook?
    Thursday, May 10, 2012 11:06 AM
  • folder? i thought that you wanted to change item type of report item in outlook?
    Sorry! You are right, but the error is on myItem.MessageClass = IPM.Note (IPM - variable not defined)
    Thursday, May 10, 2012 11:09 AM
  • should be "IPM.Note" - it is a string value
    Thursday, May 10, 2012 11:12 AM
  • It is not an email, it's a report item. It may have come in via your email account, but it is a different type of item, just as a meeting or task request is not a mail item.
     
    If it's type is olReport instantiate it as Outlook.ReportItem and get whatever data is there from that objectg.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm
     
     
    "pmkdatabase" <=?utf-8?B?cG1rZGF0YWJhc2U=?=> wrote in message news:12d175e2-bf8c-4f83-a2dc-ea8c97e9dff1...

    Hi,

    I am trying to process an email using the Outlook object model in VBA. This is definitely and email. It is a bounce. Outlook classifies it as type olreport. Any ideas why, and how I can get it to recognize it as an email?

    Thank you.


    Ken Slovak MVP - Outlook
    Thursday, May 10, 2012 2:09 PM
    Moderator
  • It is not an email, it's a report item. It may have come in via your email account, but it is a different type of item, just as a meeting or task request is not a mail item.
     
    If it's type is olReport instantiate it as Outlook.ReportItem and get whatever data is there from that objectg.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm
     

    Thanks. I have send on the revised code to the client to try as I cannot reproduce the problem.

    Can you explain the possible reasons why the same bounce, from the same SMTP server, to the same incorrect address was for weeks indeed an email, but now has changed to a report?

     

    Ken Slovak MVP - Outlook

    Friday, May 11, 2012 9:01 AM
  • I can't answer that question. All I can say is you need to check anything in Inbox to see what type the item is, you cannot just assume it will be a mail item.

    --
    Ken Slovak
    [MVP - Outlook]
    http://www.slovaktech.com
    Author: Professional Programming Outlook 2007
    Reminder Manager, Extended Reminders, Attachment Options
    http://www.slovaktech.com/products.htm
     
     
    "pmkdatabase" <=?utf-8?B?cG1rZGF0YWJhc2U=?=> wrote in message news:f17d2a69-0ea1-4b3c-a7ec-5fa51b53430f...

    Thanks. I have send on the revised code to the client to try as I cannot reproduce the problem.

    Can you explain the possible reasons why the same bounce, from the same SMTP server, to the same incorrect address was for weeks indeed an email, but now has changed to a report?


    Ken Slovak MVP - Outlook
    • Marked as answer by pmkdatabase Friday, May 11, 2012 2:30 PM
    Friday, May 11, 2012 2:05 PM
    Moderator
  • I can't answer that question. All I can say is you need to check anything in Inbox to see what type the item is, you cannot just assume it will be a mail item.
    OK - thanks for the help - much appreciated.
    Friday, May 11, 2012 2:30 PM