For CDO 1.21 you really want to explore the
www.cdolive.com Web site. It has
tons of CDO sample code plus various property tags including lots of
undocumented property tags.
Where is this code running, a form with VBScript or in Outlook VBA? This
sample is VBA style, just comment out the As clauses to make it VBScript
compatible:
Dim oSession As MAPI.Session
Set oSession = CreateObject("MAPI.Session")
oSession.Logon "", "", False, False
' Const CdoDefaultFolderInbox = 1 ' uncomment for VBScript code
Dim oFolder As MAPI.Folder
Set oFolder = oSession.GetDefaultFolder(CdoDefaultFolderInbox)
Dim colMessages As MAPI.Messages
Set colMessages = oFolder.Messages
Dim oMessage As MAPI.Message
For Each oMessage In colMessages
'whatever
Next
--
Ken Slovak
[MVP - Outlook]
http://www.slovaktech.com
Author: Professional Programming Outlook 2007.
Reminder Manager, Extended Reminders, Attachment Options.
http://www.slovaktech.com/products.htm
"Bob Smith" wrote in message
...
I posted this in the VBScript forum, but have not recieved a response. I
was
wondering if anyone had an example of how to connect to a mailbox
(exchange
2003) via VBScript using CDO. I am looking to enumerate through the items
int
he inbox and perform some tasks. I just need a starting point, as I have
not
used CDO for anything but sending messages int he past.