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.

Note If you do not want to create the spreadsheet straight away, click<br />

OK on the message window. A message prompts you whether or not to<br />

save the document. If you click Yes, the 1-2-3 object will be saved as a<br />

blank object. You can update it later on.<br />

Creating a Linked Object Using <strong>LotusScript</strong><br />

In this section you will link data from another application as an object in a<br />

Notes document using <strong>LotusScript</strong>. The following example shows how to<br />

link an object from a Microsoft Word document into a Notes document. As<br />

we noted be<strong>for</strong>e, links are dependent on the directory structure of the file<br />

system because they do not store the object’s data in the Notes data store.<br />

So, links can be broken if the document is mailed to a user who does not<br />

have the object’s data in the same physical location on their machine.<br />

1. First, create a new MS Word document or use an existing one. If you<br />

need help to create this document, refer to the appropriate product<br />

manual. We called our document WDREADME.DOC. It looks like this:<br />

2. Open the OLE 2 Notes database. The view window displays.<br />

3. On the navigator pane, select Design, then Forms and open the OLE 2<br />

Document <strong>for</strong>m. The Form Design window displays.<br />

4. Move to the end of the <strong>for</strong>m and click the cursor under the Embed New<br />

Data Object button.<br />

5. Choose Create - Hotspot - Button from the menu bar and type Link an<br />

Object from a File in the Button label: box.<br />

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