LOTUSSCRIPT/COM/OLE CLASSES
Examples: GetEmbeddedObject method
1. This script finds a rich text item called Body in a document and uses GetEmbeddedObject to check if the Body item contains an embedded object called "Jim." It displays a message stating whether or not Jim was found.
Dim doc As NotesDocument
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Set object = rtitem.GetEmbeddedObject( "Jim" )
If ( object Is Nothing ) Then
Messagebox( "Unable to find an object named Jim" )
Else
Messagebox( "Found an object named Jim" )
End If
End If
2. This action script is similar to the one above, but it gets an embedded object named Eben using the Activate method in NotesEmbeddedObject to launch the application in which Eben was created. Since the script runs on a workstation, the script can bring up the application's user interface.
Sub Click(Source As Button)
Dim rtitem As Variant
Dim object As NotesEmbeddedObject
Dim handle As Variant
'...set value of doc...
Set rtitem = doc.GetFirstItem( "Body" )
If ( rtitem.Type = RICHTEXT ) Then
Set object = rtitem.GetEmbeddedObject( "Eben" )
If Not ( object Is Nothing ) Then
Set handle = object.Activate( True )
End If
End If
End Sub
See Also
GetEmbeddedObject method
Glossary
Feedback on
Help
or
Product Usability
?
Help on Help
All Help Contents
Glossary