Solved

MailItem ReceivedTime property problem with Undeliverable messages

Posted on 2003-11-22
3
431 Views
Last Modified: 2012-08-14
Hi,

An app I'm developing needs to iterate through an Outlook folder checking for, among other things,  'Undeliverable' messages.

I've noticed that VBA throws an error if you try to retrieve the ReceivedTime property of an Undeliverable message.  Could anyone explain exactly why this is?  I can understand that these messages are slightly different from a standard email but they  still arrive at a specific time and this field can be displayed in Outlook.

Retreiving this property would prove a major advantage for my app.  Any suggestions/comments will be welcomed.

Cheers,
 
0
Comment
Question by:trident2
  • 2
3 Comments
 
LVL 75

Accepted Solution

by:
Anthony Perkins earned 35 total points
Comment Utility
>>Could anyone explain exactly why this is? <<
Because they are not a mailitem.  Since you have your variable declared as mailitem it will fail.  You need to define it as Object.

Also, please let me know if you need help maintaining your old open questions:

1 05/24/2003 125 Simulating dial-up over broadband  Open Broadband
2 08/26/2003 50 Quarantine folders/drives in XP  Open Security
3 10/30/2003 75 Outlook always attempts to send mail via...  Open Microsoft Outlook
4 11/01/2003 125 VBA SQL doesn't recognise variable value  Open Applications

Thanks,
Anthony
0
 

Author Comment

by:trident2
Comment Utility
Many thanks Anthony   - do these delivery notifications have a specific object type?

I've closed a couple of my old q's but the other's I haven't  received adequate or any replies to.  As I still don't know the answer myself what should I do? (I'm sure it's in the FAQs somewhere but couldn't find it)

Thanks again

A

0
 
LVL 75

Expert Comment

by:Anthony Perkins
Comment Utility
>>do these delivery notifications have a specific object type?<<
They should, but I don't recall, this was something I did over three years ago.

>>As I still don't know the answer myself what should I do?<<
To be honest with you the chances that someone will followup with a question that is nearly three months old is exactly 0.  After 21 days of inactivity questions are considered technically abandoned.

From the EE Guidelines:

<quote>
What are my choices?  
You have five choices when it comes to closing your open questions:

Accept an Expert's Comment as the Answer http://www.experts-exchange.com/help/closing.jsp#2
Accept Comments from more than one Expert (a Split) http://www.experts-exchange.com/help/closing.jsp#3
Request a refund because you answered your own question (Refund/PAQ) http://www.experts-exchange.com/help/closing.jsp#4
Request a refund because no one answered your question (Delete) http://www.experts-exchange.com/help/closing.jsp#5
Abandon your question and leave the mess for someone else to clean up http://www.experts-exchange.com/help/closing.jsp#12
</quote>

Anthony
0

Featured Post

Why You Should Analyze Threat Actor TTPs

After years of analyzing threat actor behavior, it’s become clear that at any given time there are specific tactics, techniques, and procedures (TTPs) that are particularly prevalent. By analyzing and understanding these TTPs, you can dramatically enhance your security program.

Join & Write a Comment

Most everyone who has done any programming in VB6 knows that you can do something in code like Debug.Print MyVar and that when the program runs from the IDE, the value of MyVar will be displayed in the Immediate Window. Less well known is Debug.Asse…
Background What I'm presenting in this article is the result of 2 conditions in my work area: We have a SQL Server production environment but no development or test environment; andWe have an MS Access front end using tables in SQL Server but we a…
As developers, we are not limited to the functions provided by the VBA language. In addition, we can call the functions that are part of the Windows operating system. These functions are part of the Windows API (Application Programming Interface). U…
This lesson covers basic error handling code in Microsoft Excel using VBA. This is the first lesson in a 3-part series that uses code to loop through an Excel spreadsheet in VBA and then fix errors, taking advantage of error handling code. This l…

744 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now