Domino Code Fragment

Code Name*
How to Get Data from an OLE Object via Notes LotusScript Front-End Methods
Date*
04/29/2024
Source (or email address if you prefer)*
Rlatulippe@romac.com
IP address:.3.15.229.113
Description*
How to Get Data from an OLE Object via Notes LotusScript Front-End Methods
Type*
LotusScript
Categories*
(Misc)
Implementation:
Required Client:
Server:
Limitations:
Comments:
Files/Graphics attachments (if applicable): Code:
Problem:
In Notes, you want to pull some data out of an OLE or an ActiveX object that is embedded

in the current Notes document. You want to write the data to one of the fields, using the
Notes front-end methods. What is an example of this?

Solution:
Below is an example illustrating how to get data from an Excel object using Lotuscript

front-end methods:

Dim workspace As New NotesUIWorkspace
Dim uidoc As NotesUIDocument
Dim handle As Variant
Dim CellValue as Variant


Set uidoc = workspace.CurrentDocument
Set handle = uidoc.GetObject( "Microsoft Excel 5.0 Worksheet")
CellValue = handle.cells(1,1).value
Call UIDoc.FieldSetText( "num", Str(CellValue))


Notice that when the GetObject method is used, the object's name is taken as the argument.
Objects will have names by default when they are created. To check an object's name, you

give it focus. When the object is highlighted, it will appear as a menu choice. To see the
object, select Object, Properties.