471,356 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
Post +

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 471,356 software developers and data experts.

How do you determine item type in a folder in vb.net?

I am trying to process all folders in a "sent items" folder in outlook 2000.
Most items are of "mail Item" type, but some are of an appointment item type.

I've looked through the newsgroups, and I've also looked through Slipstick,
and Sue's book. Most of that is geared towards VB 6 it seems.

Here is the code snippet

Sent_Folder = objNS.GetDefaultFolder
objItems = Sent_Folder.Items
curmsg = 1
folder_count = objItems.Count
While loop_continue
obj = objItems.Item(curmsg) 'OBJ IS DEFINED AN OBJECT
If obj.typename() <> "MailItem" Then
msg = objItems.Item(curmsg)
If msg.SentOnBehalfOfName = "SPECIFIC PERSON" Then
objItems = Sent_Folder.Items
folder_count = objItems.Count
curmsg += 1
End If
End If
If curmsg > loop_continue Then
loop_continue = False
End If
End While

In Sue's book it talks about using typename() or Class, but neither are
available using vb.net.

When I type the following objItems.Item(curmsg).
Then intellisense only gives me one option which is GETYPE(), but that
doesn't return what type of item it is.

Any help you could provide would be most appreicated.

Jul 21 '05 #1
0 1020

This discussion thread is closed

Replies have been disabled for this discussion.

Similar topics

18 posts views Thread by Christopher W. Douglas | last post: by
3 posts views Thread by Web Webon | last post: by
4 posts views Thread by Marcel Stör | last post: by
2 posts views Thread by Daniel Walzenbach | last post: by
7 posts views Thread by Guido Rooms | last post: by
reply views Thread by XIAOLAOHU | last post: by

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.