From: LikeToCode on 5 Mar 2010 10:53 Hi Dan, This is the line of code causing your error. Set objContact = objContainer.Create("Contact","cn=" & strContactName) There are two reasons for your errors. 1) objContainer does not contain any connection to Active Directory 2) "cn=" & strContactName requires double quotes (") around the username. Change the above line of code to this and it should work for you. Set objContact = objOU.Create("Contact",_ "cn=" & Chr(34) & strContactName & Chr(34))
From: LikeToCode on 5 Mar 2010 11:18 Sorry I did not catch this before but in your code you have "cn=" & strContactName and strContactName = objuser.name which translates to "CN=UserName". So this "cn=" & strContactName MEANS THIS "cn=CN=UserName" soooooo Remove the "cn=" from your code. Set objContact = objOU.Create("Contact", Chr(34) & strContactName & Chr(34))
|
Pages: 1 Prev: Removing expired certificates from LDS Next: Create Exchange 2007 mailbox |