Solved

MailItem ReceivedTime property problem with Undeliverable messages

Posted on 2003-11-22
3
437 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
ID: 9804282
>>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
ID: 9804429
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
ID: 9804612
>>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

Is Your Active Directory as Secure as You Think?

More than 75% of all records are compromised because of the loss or theft of a privileged credential. Experts have been exploring Active Directory infrastructure to identify key threats and establish best practices for keeping data safe. Attend this month’s webinar to learn more.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Introduction While answering a recent question (http://www.experts-exchange.com/Q_27402310.html) in the VB classic zone, I wrote some VB code in the (Office) VBA environment, rather than fire up my older PC.  I didn't post completely correct code o…
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…
Get people started with the process of using Access VBA to control Excel using automation, Microsoft Access can control other applications. An example is the ability to programmatically talk to Excel. Using automation, an Access application can laun…
Get people started with the utilization of class modules. Class modules can be a powerful tool in Microsoft Access. They allow you to create self-contained objects that encapsulate functionality. They can easily hide the complexity of a process from…

911 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

22 Experts available now in Live!

Get 1:1 Help Now