Dim sessin As New NotesSession
Dim workspace As New NotesUIWorkspace
Dim db As NotesDatabase
Dim uidoc As NotesUIdocument
Dim doc1 As NotesDocument,doc2 As NotesDocument
Dim item As NotesItem
Set uidoc=workspace.CurrentDocument
Set doc1= uidoc.Document
Set db=session.currentdatabase
Set doc2=New notesdocument(db)
在当前表单中有一个"Subject"域,和一个确定按钮.上面的代码在确定按钮的"click"事件中.点击后就弹出variant does not contain an object.请问一下是什么问题?
------解决方案--------------------
你定义的是:
Dim sessin As New NotesSession
使用的是:
Set db=session.currentdatabase ,
开启Debug就很容易发现了, 建议打开变量强制申明开关(在Options 里输入"Option Declare" ),这样会自动报错的
------解决方案--------------------
同上,看样子是个新手哦。
调试相关代码:
sub
on error goto er
'此处插入你的相关代码
exit sub
er:
msgbox cstr(ERL())
end sub