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.

Creating an Embedded Object Using <strong>LotusScript</strong><br />

In this section you are going to create an embedded object in a Notes<br />

document using <strong>LotusScript</strong>.<br />

Using OLE automation in Notes allows you to combine the services Notes<br />

provides with the services of the OLE application. Notes can serve as the<br />

container <strong>for</strong> the application, providing replication, security, and access<br />

control as well as summarizing the data in views and making it possible to<br />

search <strong>for</strong> in<strong>for</strong>mation using Notes’ full-text indexing capabilities. The OLE<br />

application can provide services that would require extensive ef<strong>for</strong>t to<br />

develop in Notes, such as the cell engine from Excel or 1-2-3 or the<br />

sophisticated text handling capabilities of Word or Word Pro.<br />

Notes provides the very best container <strong>for</strong> these objects, as it frees users<br />

from having to learn the hierarchical file system (all Notes documents, even<br />

those with objects in them, can have a word-based title). In addition, Notes’<br />

development capabilities and integrated messaging services make using<br />

OLE applications as part of a workflow application fast and easy.<br />

Embedding an Entire File in a Document<br />

You can embed an entire file from another application as an object in a<br />

Notes document using <strong>LotusScript</strong>.<br />

The following example shows how to embed data from a Lotus 1-2-3<br />

spreadsheet file into a Notes document.<br />

1. First, create a new Lotus 1-2-3 spreadsheet or use an existing<br />

spreadsheet. In our example, we are using a new spreadsheet. It looks<br />

like this:<br />

2. Save this file as EMDBFILE.WK4 in your Notes path, <strong>for</strong> example,<br />

d:\notes\data\123.<br />

178 <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!