PokerJoker
Guest
|
Posted:
Fri Dec 03, 2004 5:57 am Post subject:
Invalid Cast (objMailbox = objADSIuser) CDOEXM.DLL |
|
|
I've recently created a "new employee" form that creates accounts, mailboxes,
and the like.
On my development box (xp pro), the code works fine. However, now that I am
trying to move the code to the production server (2003), I am running into
the following error.
Invalid Cast Specified (see comment for line)
Here is the code
Dim objMailbox As CDOEXM.IMailboxStore
Dim objADSIuser As ActiveDs.IADsUser
'Bind User to AD
objADSIuser = GetObject(ADSIUserPath)
objMailbox = objADSIuser 'HAPPENS ON THIS LINE!
objMailbox.CreateMailbox("LDAP://" & DCServer & "/" & _
"CN=Mailbox Store (" & DCServer1 & ")," & _
"CN=Blah," & _
"CN=InformationStore," & _
"CN=" & DCServer1 & "," & _
"CN=Servers," & _
"CN=blah," & _
"CN=Administrative Groups," & _
"CN=blah," & _
"CN=Microsoft Exchange," & _
"CN=Services," & _
"CN=Configuration," & DomainName)
objADSIuser.SetInfo()
Please advise!
|
|
PokerJoker
Guest
|
Posted:
Mon Dec 06, 2004 11:05 pm Post subject:
RE: Invalid Cast (objMailbox = objADSIuser) CDOEXM.DLL |
|
|
Nobody has any info?
"PokerJoker" wrote:
| Quote: | I've recently created a "new employee" form that creates accounts, mailboxes,
and the like.
On my development box (xp pro), the code works fine. However, now that I am
trying to move the code to the production server (2003), I am running into
the following error.
Invalid Cast Specified (see comment for line)
Here is the code
Dim objMailbox As CDOEXM.IMailboxStore
Dim objADSIuser As ActiveDs.IADsUser
'Bind User to AD
objADSIuser = GetObject(ADSIUserPath)
objMailbox = objADSIuser 'HAPPENS ON THIS LINE!
objMailbox.CreateMailbox("LDAP://" & DCServer & "/" & _
"CN=Mailbox Store (" & DCServer1 & ")," & _
"CN=Blah," & _
"CN=InformationStore," & _
"CN=" & DCServer1 & "," & _
"CN=Servers," & _
"CN=blah," & _
"CN=Administrative Groups," & _
"CN=blah," & _
"CN=Microsoft Exchange," & _
"CN=Services," & _
"CN=Configuration," & DomainName)
objADSIuser.SetInfo()
Please advise! |
|
|