CDO.Folder is an interface which is only available with CDO for Exchange 2000 (aka CDOEX). CDOEX is only installed on top of Exchange 2000 Server locally and does also only run locally on the Exchange 2000 Server machine.
My guess is that you are using it on a remote machine, either a Windows 2000 Server without Exchange 2000 Server installed or a Windows 2000/XP Professional machine, where you don't have access to CDOEX but to CDOSYS (CDO for Windows 2000) which uses the same progID (CDO.xxx) but only provides a CDO.Message object. CDOSYS comes built-in with Windows 2000/Windows XP and is only good for SMTP/NNTP messaging but doesn't offer the full blown object model (with CDO.Folder and CDO.Person) CDOEX does hence all your attempts to run the code from Mindy's book fails if you don't run it on an Exchange 2000 Server locally. <Siegfried /> > -----Original Message----- > From: Ken Marychurch [mailto:[EMAIL PROTECTED]] > Sent: Friday, November 23, 2001 12:30 AM > To: Exchange Discussions > Subject: RE: How to access a folder in CDO? > > Thanks Chris. > > By using MAPI.Folder instead of CDO.Folder, are you saying that the > library > is not available. > > Please answer this: can I use the CDO.Folder method/property/object in my > VB > app? > > Thanks again! > > ~Ken > > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED]] On Behalf Of QUINN, Chris > Sent: Thursday, November 22, 2001 8:15 PM > To: Exchange Discussions > Subject: RE: How to access a folder in CDO? > > Dim cdoRootfolder As MAPI.Folder > Dim cdoNewFolder As MAPI.Folder > > Set cdoRootfolder = cdoSession.Inbox '- the folder to which the > subfolder is to be added > '- Applications/Zoo Management/ > in > your case > Set cdoNewFolder = cdoRootfolder.Folders.Add('Vets') > > with cdoNewFolder > > ...................... > -----Original Message----- > From: Ken Marychurch [mailto:[EMAIL PROTECTED]] > Sent: 21 November 2001 03:30 > To: Exchange Discussions > Subject: How to access a folder in CDO? > > > Hi all, > > I am trying to add a new folder with CDO. > I keep getting a "User-defined type is not defined." error. However, the > CDO.Folder and CDO.Person methods create an error. I find the only CDO > objects I get to choose from are CDO.Configuration, .DropDirectory and > .Message. > > I am using Mindy Martin's book "Programming Collaborative Web > Applications with MS Exchange 2000" - but the CDO examples don't even > compile because of the error. > > This small piece of code from Mindy's book doesn't work: > > Sub CreateFolder_CDO() > Dim urlVetsFld As String > Dim fldr As Folder > urlVetsFld = GetStorageName & "Applications/Zoo Management/Vets/" > If AlreadyExists(urlVetsFld) Then > Debug.Print "This folder already exists: " & urlVetsFld > Exit Sub > End If > > ' >>>>THIS BIT DOESN'T WORK!!!<<<< > With New CDO.Folder > .Description = "Information about vets." > .ContentClass = "urn:content-classes:contactfolder" > .Fields("http://schemas.microsoft.com/exchange/outlookfolderclass") = > _ > "IPF.contact" > .Fields.Update > .DataSource.SaveTo urlVetsFld > End With > End Sub > > Do I need a specific CDO library (.dll) installed? > > I am sure someone can help me with this. Your help is very much > appreciated. > ~Ken > > _________________________________________________________________ > List posting FAQ: http://www.swinc.com/resource/exch_faq.htm > Archives: http://www.swynk.com/sitesearch/search.asp > To unsubscribe: mailto:[EMAIL PROTECTED] > Exchange List admin: [EMAIL PROTECTED] > > > ________________________________________________________________________ __ > _ > This email is confidential and intended solely for the use of the > individual to whom it is addressed. Any views or opinions presented are > solely those of the author and do not necessarily represent those of > SchlumbergerSema. > If you are not the intended recipient, be advised that you have received > this > email in error and that any use, dissemination, forwarding, printing, or > copying of this email is strictly prohibited. > > If you have received this email in error please notify the > SchlumbergerSema > Helpdesk by telephone on +44 (0) 121 627 5600. > ________________________________________________________________________ __ > _ > > > _________________________________________________________________ > List posting FAQ: http://www.swinc.com/resource/exch_faq.htm > Archives: http://www.swynk.com/sitesearch/search.asp > To unsubscribe: mailto:[EMAIL PROTECTED] > Exchange List admin: [EMAIL PROTECTED] > > > _________________________________________________________________ > List posting FAQ: http://www.swinc.com/resource/exch_faq.htm > Archives: http://www.swynk.com/sitesearch/search.asp > To unsubscribe: mailto:[EMAIL PROTECTED] > Exchange List admin: [EMAIL PROTECTED] _________________________________________________________________ List posting FAQ: http://www.swinc.com/resource/exch_faq.htm Archives: http://www.swynk.com/sitesearch/search.asp To unsubscribe: mailto:[EMAIL PROTECTED] Exchange List admin: [EMAIL PROTECTED]

