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

Create successful ePaper yourself

Turn your PDF publications into a flip-book with our unique Google optimized e-Paper software.

Assign the button and icon constant name to the boxType variable.<br />

boxType = MB_OK + MB_ICONINFORMATION<br />

Assign the string to the msg variable.<br />

msg$ = |File has been embedded !<br />

Click OK to close this document|<br />

Display a message, from the msg variable, in a message box labeled<br />

“Successful” and containing a Yes and No button.<br />

Messagebox msg$, boxType, "Successful"<br />

Close the Notes document.<br />

Call uidoc.Close<br />

Next, compose a document using this <strong>for</strong>m.<br />

12. Choose Create - OLE 2 Document from the menu bar.<br />

13. Click the Embed Object from a File button. The spreadsheet is<br />

embedded in your document. It looks like this:<br />

14. Save and close the document.<br />

Note You can also embed part of a file in a Notes document using<br />

<strong>LotusScript</strong>. To do so, you need to use the object’s native <strong>LotusScript</strong><br />

function to access the object’s data in the object’s application. This can<br />

be a complex process. There<strong>for</strong>e, it might be a better choice to manually<br />

embed part of a file in a Notes document.<br />

Chapter 11: Using Notes as an OLE 2 Automation Client: Creating Objects 181

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

Saved successfully!

Ooh no, something went wrong!