Outlook.Items types
-
Mittwoch, 8. August 2012 12:58
how can i tell the type of each item in Outlook.Items?
thanks..
Alle Antworten
-
Mittwoch, 8. August 2012 13:10
depending on language, but usually you should check Class or MessageClass
-
Donnerstag, 9. August 2012 05:26can u give an example in c#?
-
Donnerstag, 9. August 2012 09:33
usually you care only for specific types on messages , so for example if you want only to process mailitems in Items collection, you should do something like that in c#:
for (int i =1; i<= Items.Count; i++) { MailItem mail = Items[i] as MailItem; if(mail == null) continue; // here process mail }- Als Antwort markiert Quist ZhangMicrosoft Contingent Staff, Moderator Donnerstag, 16. August 2012 09:45
-
Donnerstag, 9. August 2012 10:55
i tried somthing like this:
for (int i = 1; i <= Items.Count; i++) { if (!(((int)OlObjectClass.olMail).Equals(Items[i].Class))) { continue; } //rest of code }what's better?
- Bearbeitet redgolda Donnerstag, 9. August 2012 10:55
- Als Antwort markiert Quist ZhangMicrosoft Contingent Staff, Moderator Donnerstag, 16. August 2012 09:45
-
Donnerstag, 9. August 2012 11:19if you need to work with mailitem object anyway so you need to cast anyway, you are just postponing ineviteable.
-
Donnerstag, 9. August 2012 12:51do you know how to write the code in delphi?
-
Donnerstag, 9. August 2012 14:31no, too hard, only vba oneliners.

