IBM Lotus Symphony


Examples

Lists several examples of VBA code. You can edit them in the Lotus® Symphony™ Basic IDE.

Opening a new Spreadsheet document and change the content of the cell

Type the following code in the editor:
Private Sub CommandButton1_Click()
    Dim wkb As Workbook
    
    Set wkb = Workbooks.Add
    wkb.Sheets(1).Range("A1") = Now
End Sub

Opening a Lotus Notes® database through VBA COM APIs

To fulfil this task, you are required to have Lotus Notes® installed on your computer. Type the following code in the editor:
Sub OpenNotesDatabase()
	Dim notes_server As String
	Dim notes_database As String
	Dim password As String

	notes_server = "127.0.0.1"
	notes_database = "mail\test.nsf"
	password = "hello"

	Set notes_session = CreateObject("lotus.NOTESSESSION")
	Call notes_session.Initialize(password)
	Set notes_db = notes_session.GETDATABASE(notes_server, notes_database)
End Sub

Product Feedback | Additional Documentation | Trademarks