Microsoft KB Archive/899351

= The IMailBox.BaseFolder, IMailBox.RootFolder, and IMailBox.Inbox CDOEX properties may return blank values when you use script code to access a hierarchy of folders that belongs to a person =

Article ID: 899351

Article Last Modified on 9/27/2005

-

APPLIES TO


 * Collaboration Data Objects for Exchange 2000

-





SYMPTOMS
When you use script code to access a hierarchy of folders that belongs to a person, the following Collaboration Data Objects for Exchange (CDO) for Exchange 2000 Server (CDOEX) properties may return blank values:
 * IMailBox.BaseFolder
 * IMailBox.RootFolder
 * IMailBox.Inbox



CAUSE
This problem occurs because the Ole32.dll file is not correctly registered on the computer where you run the script code.



RESOLUTION
To resolve this problem, reregister the Ole32.dll file on the computer where you want to run the script code. To do this, follow these steps:  Click Start, click Run, type the following command, and then click OK.

Regsvr32.exe %Windir%\System32\Ole32.dll

 In the RegSvr32 dialog box, click OK.



STATUS
Microsoft has confirmed that this is a problem in the Microsoft products that are listed in the &quot;Applies to&quot; section.



Steps to reproduce the behavior
Use the following code example: email = WScript.Arguments(0) dn = WScript.Arguments(1) WScript.Echo &quot;email=&quot; & email WScript.Echo &quot;dn=&quot; & dn WScript.Echo Set Person = CreateObject(&quot;CDO.Person&quot;) if Person is Nothing then WScript.Echo &quot;person object is nothing&quot; end if strURL = &quot;mailto:&quot; & email WScript.Echo &quot;strURL:&quot; & strURL WScript.Echo Person.DataSource.Open strURL WScript.Echo &quot;FirstName: &quot; & Person.FirstName Set Mailbox = Person.GetInterface(&quot;IMailbox&quot;) 'These lines appear if the e-mail is valid. 'However, the Mailbox.X paths are blank. WScript.Echo &quot;inbox:&quot; & email & &quot; is: &quot; & Mailbox.Inbox WScript.Echo &quot;base :&quot; & email & &quot; is: &quot; & Mailbox.BaseFolder WScript.Echo &quot;root :&quot; & email & &quot; is: &quot; & Mailbox.Rootfolder Set Person = nothing Set Person = CreateObject(&quot;CDO.Person&quot;) strURL = &quot;LDAP://&quot; & dn WScript.Echo WScript.Echo &quot;strURL:&quot; & strURL WScript.Echo Person.DataSource.Open strURL WScript.Echo &quot;FirstName: &quot; & Person.FirstName Set Mailbox = Person.GetInterface(&quot;IMailbox&quot;) 'These lines appear if the dn is valid. 'However, the Mailbox.X paths are blank. WScript.Echo &quot;inbox:&quot; & email & &quot; is: &quot; & Mailbox.Inbox WScript.Echo &quot;base :&quot; & email & &quot; is: &quot; & Mailbox.BaseFolder WScript.Echo &quot;root :&quot; & email & &quot; is: &quot; & Mailbox.Rootfolder You experience the behavior that is mentioned in the &quot;Symptoms&quot; section.

Keywords: kbtshoot kbprb KB899351

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.