RegisterNewUser为什么会出现no resume错误?
RegisterNewUser为什么会出现
no resume的错误!程序代码是照抄帮助
或其他没有问题(个人认为)的代码
都出现这个问题
Dim session As NotesSession
Dim db As NotesDatabase
Dim note As NotesDocument
Dim view As NotesView
Dim newreg As New notesregistration
Set session = New NotesSession
Set db = session.CurrentDatabase
Set note = session.DocumentContext
Dim certidfile,certpw,org As String
Dim myDir1,myDir2 ,FullName As String
Dim message , driver , MyServer,path ,faile As String
Dim boxType As Long
Dim answer As Integer
On Error Goto ErrorHandler
'MyServer ="\\"+Strright(Strleft(db.server,"/"),"=")
MyServer ="\\"+Trim(note.server_name(0))
driver=""
path="\Domino\Data\"
myDir2="\Domino\Data\ids\people\"
length% = 2
certidfile =MyServer+path+"Cert.id"
certpw = note.CertPassword(0)
newreg.IDType =ID_HIERARCHICAL
newreg.Expiration = Cdat("2100-12-31")
newreg.MinPasswordLength = length%
newreg.IsNorthAmerican = False
newreg.CertifierIDFile = certidfile
newreg.RegistrationServer = db.Server
newreg.CreateMailDb = True
newreg.StoreIDInAddressBook = False
newreg.Updateaddressbook =True
Lastname=note.systemName(0)
If Lastname="" Then
Exit Sub
End If
MailFile = "Mail\"+Lastname+".nsf"
Firstname=""
RegServer =db.Server
' comment = "Comment contents"
comment=""
IDfile = Lastname+".id"
userPassword="pass"
middleinit=""
location = "办公室"
Call newreg.RegisterNewUser(Lastname,MyServer+driver+myDir2+ IDfile, _
RegServer, Firstname, middleinit, certpw, _
location, comment, MailFile, "", userPassword, _
NOTES_FULL_CLIENT )