Share via


Description Property

Description Property

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

A description of the folder.

Applies To

IFolder Interface

Type Library

Microsoft CDO for Exchange 2000 Library

DLL Implemented In

CDOEX.DLL

Syntax

[Visual Basic]Property Description As String

[C++]HRESULT get_Description(BSTRpVal);
HRESULT put_Description(BSTR Val);

Parameters

  • pVal
    Returns the value of the Description property as a reference to a BSTR.
  • Val
    Sets the value of the Description property to the value of the BSTR.

Remarks

This property is normally set by administrators to provide an administrative note for the folder.

Examples

[Visual Basic]

' Reference to Microsoft ActiveX Data Objects 2.5 Library ' Reference to Microsoft CDO for Exchange 2000 Library

' Note: It is recommended that all input parameters be validated before being used. Function CreateFolder(Url As String, _ ContentClass As String, _ Description As String) Set Fldr = New CDO.Folder With Fldr .ContentClass = ContentClass .Description = Description .DataSource.SaveTo Url, , _ adModeReadWrite, _ adCreateCollection

End With Set CreateFolder = Fldr

End Function

' Note: It is recommended that all input parameters be validated before being used.

Function CreateFolder( Url, ContentClass, Description ) Set Fldr = CreateObject("CDO.Folder") With Fldr .ContentClass = ContentClass .Description = Description On Error Resume Next .DataSource.Open Url, , adModeReadWrite

If Err.Number <> 0 Then
  Err.Clear
  .DataSource.SaveTo Url, , _
                    adModeReadWrite, _
                   adCreateCollection
  If Err.Number <> 0 Then
   ' Handle error
  End If
End If

End With

On Error Goto 0 Set CreateFolder = Fldr

End Function

[C++]

/* You must have the following paths in your INCLUDE path. %CommonProgramFiles%\system\ado %CommonProgramFiles%\microsoft shared\cdo

*/ #ifndef _CORE_EXAMPLE_HEADERS_INCLUDED #define _CORE_EXAMPLE_HEADERS_INCLUDED #import <msado15.dll> no_namespace #import <cdoex.dll> no_namespace #include <iostream.h> #endif

// Note: It is recommended that all input parameters be validated before being used. IFolderPtr CreateFolder(bstr_t url, bstr_t contentclass, bstr_t description) {

if(url == bstr_t("")) throw _com_error(E_POINTER);

_ConnectionPtr Conn(__uuidof(Connection)); IDataSourcePtr pDsrc(__uuidof(Folder));

Conn->Provider = "ExOLEDB.DataSource"; try { Conn->Open(url,bstr_t(),bstr_t(),-1); } catch(_com_error e) { throw e; }

IFolderPtr pFldr = pDsrc;

pFldr->ContentClass = contentclass; pFldr->Description = description;

try { pDsrc->SaveTo( url, variant_t((IDispatch*)Conn,true), adModeReadWrite, (RecordCreateOptionsEnum) ( adCreateCollection ), adOpenSource, bstr_t(), bstr_t()); } catch(_com_error e) { cerr << "Error saving folder to store" << endl; throw e; }

// close connection Conn->Close(); Conn = NULL;

return pFldr; }

Send us your feedback about the Microsoft Exchange Server 2003 SDK.

Build: June 2007 (2007.618.1)

© 2003-2006 Microsoft Corporation. All rights reserved. Terms of use.