Expression type ... not a collection type

I am very new to programming and I am working with Visual Basic Express and code from the following article:

http://support.microsoft.com/default.aspx?scid=kb;en-us;194870

I copied the code to a new project and imported the CDO 1.2 library.
I had to change "Dim oMessage As Message" to "Dim oMessage As MAPI.Message" bacause "Message" was ambiguous.
I also had to add "Dim CdoDefaultFolderInbox As MAPI.CdoDefaultFolderTypes" because it was not declared

But I still have one error that I do not know how to fix.
The code "For Each oMessage In oMsgColl" has an error "Expression is of type 'MAPI.Messages', which is not a collection type."

Any help figuring this out is greatly appreciated.

Thank you.

Charles

[898 byte] By [CharlesBlair] at [2007-12-17]
# 1
Did you add a reference to the Microsoft CDO 1.21 Library?
shoagMSFT at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...
# 2
Yes ... the 1.21 reference library is imported.

All the MAPI commands are all recognized, it is just the one that is showing up as "not a collection type"

Charles

CharlesBlair at 2007-9-8 > top of Msdn Tech,Visual Studio Express Editions,Visual Basic 2005 Express Edition...