LotusScript to C API Programming Guide

rtLib Domino Rich Text Management template
Home
Hide details for ContentContent
Getting started
Basic declaration conversion
Data and reference types
Editing reference type items
Purchase
Ready-to-use samples
Hide details for Online resourcesOnline resources
Technotes and goodies
Reference
Header files
Forum
Links
Happy readers

Anonymous

login


 

Hosted by Prominic.NET, Inc.
Main topic: Can we have an alternative to EnumCompositeBuffer in LotusScript?

The calling agent - ready to use (by Johnny Jiang, 10/26/2007 10:31:50 PM)

Declaration

'Current agent name

Private Const AgentName = "CAgent"

Sub Initialize

   On Error Goto ErrorHandler

   

   Dim session As New NotesSession

   Dim ws As New NotesUIWorkspace

   Dim db As NotesDatabase

   Dim doc As NotesDocument

   Dim varDbPath As Variant

   

   varDbPath = ws.Prompt(13, "Select database to open", "Select database to open")

   If Not(Isempty(varDbPath)) Then

      Dim objNotesDB As New CNotesDatabase

      Dim objNotesForm As CNotesForm

      

      Call objNotesDB.Open(varDbPath(0), varDbPath(1))

      Set objNotesForm = objNotesDB.GetNotesForm("MainTopic")

      Call objNotesForm.GetActionBarInfo()

   End If

   

ExitSub:

   Exit Sub

   

ErrorHandler:

   Dim ErrStr As String

   

   ErrStr = AgentName + "(Agent)" + Chr(10) + Chr(10) + "code: " + Cstr(Err) + Chr(10) + "at line: " + Cstr(Erl) + Chr(10) + "message: " + Error$

   

   Call ShowErrorMessage(ErrStr)

   

   Resume ExitSub

End Sub