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]

Reply via email to