给你个vb的解决办法
客户端注册NOTES COM控件。(regsvr32 c:\lotus\notes\DOMOBJ.TLB)regsvr32 c:\lotus\notes\nlsxbe.d
<SCRIPT LANGUAGE="VBScript">
Sub Button1_OnClick
dim s, dir, db, doc, eo, no, word, worddoc
Set s = CreateObject("Lotus.NotesSession")
Call s.Initialize
这样就获得了NotesSession对象,想做什么都可以了
Lotus C++ API Toolkit Documentation Release 2.4 English
http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2003-03-06+04%3A05%3A52.553792R&S_TACT=TrialsAndBetas&S_CMP=&s=
Lotus C++ API Toolkit Release 2.4 for Win32 English
http://www14.software.ibm.com/webapp/download/preconfig.jsp?id=2003-03-06+04%3A05%3A52.786750R&S_TACT=TrialsAndBetas&S_CMP=&s=
The back-end Domino Objects have a Component Object Model (COM) interface. The COM interface is the same as the LotusScript interface with some exceptions. These exceptions are noted below in "General exceptions to LotusScript specifications" and "Specific exceptions to LotusScript specifications," and in the LotusScript classes A-Z reference.
COM provides both early-binding (custom) and late-binding (dispatch) interfaces. Early binding makes the Domino classes available as typed variables with compile-time checking. Late binding can be used where the language (for example, VBScript) precludes early binding.
Notes
This feature is new with Release 5.0.2b.
This feature is not supported under OS/2, under UNIX, and on the Macintosh.
Requirements
The COM interface is available on a computer containing any of the following:
Domino Designer Release 5.0.2b or later
Domino Server Release 5.0.2b or later
Notes Client Release 5.0.2b or later
The Domino or Notes software must be installed but need not be running.
Installation of the Domino or Notes software makes a type library available and registers the following classes:
Lotus.NotesSession
Lotus.NotesSession.1
Do not confuse these with the OLE automation objects Notes.NotesSession and Notes.NotesUIWorkspace.
The Domino COM objects must be able to locate a valid NOTES.INI file, looking first in the Domino or Notes program directory and then at the PATH system variable. The KeyFileName setting in the NOTES.INI file specifies the user ID that COM uses.
Creating a session object
To access the Domino Objects, create an object based on the registered Lotus.NotesSession class.
Visual Basic
Include the Domino object library in the Visual Basic project:
Choose Project - References.
Check "Lotus Domino Objects."
The location will show the path to DOMOBJ.TLB in the Domino or Notes program directory.
Alternatively, you can select the Browse button and specify DOMOBJ.TLB in the Domino or Notes program directory.
The Domino Objects then become available to the project. You can see them in the Object Browser and they appear as prompts when you start typing an object name.
The classes appear in the left-hand pane of the browser; the properties and methods appear in the right-hand pane for the selected class. Constants appear in the left-hand pane as Enum data structures; the members appear in the right-hand pane. For example, the Enum structure named ACLLEVEL contains the members ACLLEVEL_AUTHOR, ACLLEVEL_DEPOSITOR, and so on. The error constants appear in the right-hand pane when NOTES_ERRORS is selected in the left-hand pane.
To access the Domino Objects, create a NotesSession object with either:
Dim session As New NotesSession
Or:
Dim session As NotesSession
Set session = CreateObject("Lotus.NotesSession")
注释 If you declare the session variable as Variant or Object, COM uses late binding.
VBScript
In VBScript, create a NotesSession object with:
Dim session
Set session = CreateObject("Lotus.NotesSession")
VBScript treats all variables as Variant so COM uses late binding.
The Domino constants are not defined. You must specify the actual values (or define the constants yourself). See the discussion of constant values below in "Constants."
Initializing a session
You must explicitly initialize a COM session with one of the following NotesSession methods. These methods do not apply to LotusScript applications.
Call session.Initialize("passwordOptional")
Call session.InitializeUsingNotesUserName("name", "passwordOptional")
The parameters are all strings. The name parameter can be an empty string. The password parameter is optional.
Initialization occurs as follows:
Initialize: this method can be used on a computer with a Notes client or Domino server and bases the session on the current user ID. If a password is specified, it must match the user ID password. If a password is not specified, the user is prompted for a password as required and as the software permits. If the software does not support prompting (for example, VBScript under ASP/IIS), you must supply the password or the user ID must not have one.
InitializeUsingNotesUserName: this method can be used only on a computer with a Domino server. If a name is specified, the InitializeUsingNotesUserName method looks it up in the local Domino Directory and permits access to the local server depending on the "Server Access" and "COM Restrictions" settings. The password must match the Internet password associated with the name. If no name is specified, access is granted if the server permits Anonymous access.
These methods assume that you trust the local Domino or Notes installation.
Access to the Domino Objects is as a client if you use the Initialize method and the user ID is not specified as a server in the local Domino or Notes directory. Otherwise, access is as a server. As a client, you can access any server that accepts your user ID. As a server, you can access only the local server.
1、引用“Lotus Domino Objects”
2、输入代码:
Dim ss as New NotesSession
ss .initialize
Dim db as NotesDatabase
set db = ss.getDatabase("";"names.nsf")
3、说明:
除NotesSession对象外,其他对象不支持NEW方法,需要从NotesSession引伸