18.01.2013 Views

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

LotusScript for Visual Basic Programmers - IBM Redbooks

SHOW MORE
SHOW LESS

You also want an ePaper? Increase the reach of your titles

YUMPU automatically turns print PDFs into web optimized ePapers that Google loves.

This statement assigns object as a reference variable to the object name in<br />

the object rich text item.<br />

Set object = rtitem.GetEmbeddedObject (objName)<br />

Verify if the object name in the current document is equal to the object<br />

name entered by the user.<br />

If Not object Is Nothing Then<br />

Verify if the object type is a linked object.<br />

Case EMBED_OBJECTLINK<br />

Set the className variable with the object’s class name.<br />

className = object.Class<br />

Set the boxType variable with OKCANCEL button and icon in<strong>for</strong>mation<br />

values.<br />

boxType = MB_OKCANCEL + _<br />

MB_ICONINFORMATION<br />

Display the messages from the in msg1, msg2, msg3 variables in a message<br />

box labeled “Object In<strong>for</strong>mation” containing an OK and a Cancel button.<br />

This message box function returns a value when the button is clicked.<br />

answer = Messagebox (msg1 & msg2 & msg3, _<br />

boxType, "Object In<strong>for</strong>mation")<br />

Verify if the clicked button is the OK button.<br />

If answer = 1 Then<br />

Load the object, through OLE, in the Notes document by displaying the<br />

user interface of the server application.<br />

handle = object.Activate (True)<br />

Assign the doc as a reference variable to the next document in the collection<br />

of documents.<br />

Set doc = collection.GetNextDocument (doc)<br />

Verify the value of doc and the found variables. If one of the variable values<br />

is true, the loop is terminated.<br />

Until (doc Is Nothing ) Or found<br />

Exit from this click procedure.<br />

Exit Sub<br />

202 <strong>LotusScript</strong> <strong>for</strong> <strong>Visual</strong> <strong>Basic</strong> <strong>Programmers</strong>

Hooray! Your file is uploaded and ready to be published.

Saved successfully!

Ooh no, something went wrong!