File: outlook.sra
Size: 1218
Date: Mon, 31 Dec 2018 21:14:38 +0100
$PBExportHeader$outlook.sra
$PBExportComments$Generated Application Object
forward
global type outlook from application
end type
global transaction sqlca
global dynamicdescriptionarea sqlda
global dynamicstagingarea sqlsa
global error error
global message message
end forward

global variables
n_OLEObject oleApplication

end variables
global type outlook from application
string appname = "outlook"
end type
global outlook outlook

on outlook.create
appname="outlook"
message=create message
sqlca=create transaction
sqlda=create dynamicdescriptionarea
sqlsa=create dynamicstagingarea
error=create error
end on

on outlook.destroy
destroy(sqlca)
destroy(sqlda)
destroy(sqlsa)
destroy(error)
destroy(message)
end on

event open;Integer li_rc

oleApplication = CREATE n_OLEObject

// Connect to Outlook. Class name may differ depending on version.
li_rc = oleApplication.ConnectToNewObject("Outlook.Application")
If li_rc = 0 Then
   Open(w_main)
Else
   MessageBox("Error connecting to Outlook", &
         oleApplication.of_ConnectError(li_rc), StopSign!)
   Return
End If

end event

event close;// Disconnect from Outlook.
oleApplication.DisconnectObject()

end event