473,323 Members | 1,537 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,323 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
Outlook.OlDefaultFolders.olFolderSentMail)
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
curmsg += 1 'BASICALLLY IGNORE IT CONTINUE WITH THE NEXT
ITEM
Else
msg = objItems.Item(curmsg)
If msg.SentOnBehalfOfName = "SPECIFIC PERSON" Then
msg.Move(SPECIFIC_folder)
objItems = Sent_Folder.Items
folder_count = objItems.Count
Else
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.

jf
Jul 21 '05 #1
0 1082

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

18
by: Christopher W. Douglas | last post by:
I am writing a VB.NET application in Visual Studio 2003. I have written a method that handles several events, such as closing a form and changing the visible status of a form. I have some code...
3
by: Web Webon | last post by:
Hi everybody! I wonder if this is possible? I need to determine if a client is using "windows classic folders" or anything else. If I instantiate a Shell ActiveX object is there a way of...
4
by: Marcel Stör | last post by:
Hi folks Does anyone know how to add an object of type ContactItem to an _Items list? _Items provides an add() method which, however, only accepts a Variant as parameter... Here's what I do: -...
2
by: Daniel Walzenbach | last post by:
Hi, I created an ASP.NET Datagrid where a single row can be selected by clicking anywhere on the row (according to...
7
by: Guido Rooms | last post by:
Hello All, I'd like to keep some files (modules) which are to be used in many projects/solutions in a separate folder, not belonging to any project or solution, such that I can add (link) them...
4
by: John A. Bailo | last post by:
After upgrading from Outlook 2000 to the 2003 object model, some of my Outlook automation code no longer functions. For example, in 2000, I used to be able to loop through a list of .Items in a...
5
by: yancheng.cheok | last post by:
hello, may i know how i can determine whether a pointer is pointing to an array or a single item during runtime? this is because in certain situation, i need to determine whether to use delete...
1
by: topramen | last post by:
does any one here know of a good way to to determine whether or not a given path is a directory (e.g., "c:\mydir") or a file (e.g., "c:\mydir \myfile.txt")? i started attacking this problem by...
3
by: ommail | last post by:
I have two RichTextBox controls on a form, and single ContextMenuStrip control which serves for both textboxes. I need to determine which RichTextBox control invokes an event handler in...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
1
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...
0
by: Vimpel783 | last post by:
Hello! Guys, I found this code on the Internet, but I need to modify it a little. It works well, the problem is this: Data is sent from only one cell, in this case B5, but it is necessary that data...
1
by: PapaRatzi | last post by:
Hello, I am teaching myself MS Access forms design and Visual Basic. I've created a table to capture a list of Top 30 singles and forms to capture new entries. The final step is a form (unbound)...
1
by: CloudSolutions | last post by:
Introduction: For many beginners and individual users, requiring a credit card and email registration may pose a barrier when starting to use cloud servers. However, some cloud server providers now...
1
by: Shællîpôpï 09 | last post by:
If u are using a keypad phone, how do u turn on JavaScript, to access features like WhatsApp, Facebook, Instagram....
0
by: af34tf | last post by:
Hi Guys, I have a domain whose name is BytesLimited.com, and I want to sell it. Does anyone know about platforms that allow me to list my domain in auction for free. Thank you
0
by: Faith0G | last post by:
I am starting a new it consulting business and it's been a while since I setup a new website. Is wordpress still the best web based software for hosting a 5 page website? The webpages will be...
0
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 3 Apr 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome former...

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.