Lotus Notes FAQ Visit Our Sponsor!

Can you add a database icon which launches a program?

There are several things you can do to run programs from the Notes desktop:

1) Use a smarticon or a button to launch a program:

  @Command([Execute]; "D:\\dir\\subdir\\executable.EXE"; "parameters")

2) If you are running a program, add this to the PostOpen event of the database script:

  Sub Postopen(Source As Notesuidatabase)
    Dim taskId As Integer
    taskId% = Shell("CALC.EXE", 1)
  End Sub

3) If your application is an OLE program, create a single document (with an embedded OLE object) in the database and set the form to automatically launch the first object in the form. Add this to the PostOpen event of the database script:
  Sub Postopen(Source As Notesuidatabase)
    Dim workspace As New NotesUIWorkspace
    Dim uidoc As NotesUIDocument
    Set uidoc = workspace.EditDocument(0)
  End Sub

Applies to Notes Versions: 4.5, 4.6, 5
Last Modified: August 31, 1999