473,237 Members | 1,067 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,237 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 1080

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...
2
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 7 Feb 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:30 (7.30PM). In this month's session, the creator of the excellent VBE...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
Git
by: egorbl4 | last post by:
Скачал я git, хотел начать настройку, а там вылезло вот это Что это? Что мне с этим делать? ...
1
by: davi5007 | last post by:
Hi, Basically, I am trying to automate a field named TraceabilityNo into a web page from an access form. I've got the serial held in the variable strSearchString. How can I get this into the...
0
by: DolphinDB | last post by:
The formulas of 101 quantitative trading alphas used by WorldQuant were presented in the paper 101 Formulaic Alphas. However, some formulas are complex, leading to challenges in calculation. Take...
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...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
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...

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.