Changing users certificate from current to new

Hi,I am trying to change certificate of user, I am using the following code, and getting the below error

Error : An improperly formed name was encountered

Code :

On Error GoTo errhandler

Dim session As New NotesSession

Dim adminp As NotesAdministrationProcess



Set adminp = session.Createadministrationprocess("TestN/Work")

adminp.Certifierfile = "C:\Program Files\IBM\Domino\data\cert.id"

adminp.Certifierpassword = "password"



noteid$ = adminp.Moveuserinhierarchyrequest("Pravin Manhotra/Work", "VALMET", False)

adminp.Certifierfile = "C:\valmet_Ids\valmet.id"

adminp.Certifierpassword = "password"

Call adminp.Moveuserinhierarchycomplete(noteid$, "", "", "", "", "", "VALMET", "", False)



If noteid$ <> "" Then

	Dim db As New NotesDatabase("TestN/Work","admin4.nsf")

	MsgBox db.title

	Dim ws As NotesUIWorkspace	

	Call ws.Editdocument(False, db.Getdocumentbyid(noteid))

End If



MsgBox "Done"

Exit Sub	

errHandler:

MsgBox "Error On Line : " + CStr(Erl) + Chr(10) + "Error Code : " + CStr(Err) + Chr(10) + "Error : " + CStr(error)

I don’t know the exact method but trying.

Please help me.

Subject: Answer

Here is a post tha had the same issue and how they solved the issue

http://www-10.lotus.com/ldd/nd85forum.nsf/dba3ca7e515d55ff85256a0700727b35/07fc34e0ad09cea0852578b0003dad49?OpenDocument

Subject: trying same option

Hi Barry,Thanks for the reply

Actually posting this post I have searched the forum and found the same link you have shared with me. I am using the same method, but in the given link, it is not given how did that guy manage to solve the query.

Still I am trying…

I think I am not getting NotesID in Line

noteis$ = adminp.MoveUserinHierarchyRequest(“abc/work”,“abc/VALMET”,FALSE)

and today I got different error as previous

Error :

“A required entry was not found in the Name and Address Book; consult the Notes Log for details on the specific entry”

Subject: more examples

The first one is a good example of what is missing from the help document

http://www-10.lotus.com/ldd/ddwiki.nsf/dx/MoveUserInHierarchyRequest_and_MoveUserInHierarchyComplete_Example

http://www.keithstric.com/A55BAC/keithstric.nsf/default.xsp?documentId=EDA8F3F3DB36B9CE85257920000495B3

http://www.pressingquestion.com/3856035/Rename-And-Change-Users-Oudepartment-In-Domino-Directory-Using-Lotusscript%3F

Subject: Thanks! Solved

Hi,Yes while trying with different options I realize that in help file it is shown to supply new Certificate path and password for MovetoHirarchyRequest, while actually we need to pass current certificate and later for MoveToHirarchyComplete we need to pass new Certificate path and password.

Thanks, for the support and help.