Tips for using OLE in Notes by John Thornton (with Barbara Burch)

[Editor’s note: This article resides in “Iris Today”, the technical Webzine located on the http://www.notes.net Web site produced by Iris Associates, the developers of Domino and Notes.]

From the very beginning, Notes has played well with other applications. Whether using import/export capabilities in R1, or OLE features and NotesFX (Notes Field Exchange) in R3, or ActiveX support and beyond, you've always been able to easily transfer data in-and-out of Notes. In fact, according to former Iris developer Jack Ozzie, "Notes R3 was one of the first, if not the first, OLE container."

Since then, Notes has continuously expanded its support of OLE as a powerful design tool. R4 included rich OLE features like in-place editing, drag-and-drop support, NotesLinks, and the extension of NotesFX to include Notes actions (NotesFlow). In addition, you could use Notes as an automation object with LotusScript, or use Notes as an OLE automation controller. Notes R4.6 enhanced its OLE features further by adding ActiveX support. This introduced several OLE properties to control how OLE and OLE custom controls (OCX) load and display in Notes. For example, these properties allow an object to size to the window, size below a field, update from a document instead of from a form, or run in read mode. You can see examples of these features when you use Lotus Word Pro or Word as your mail editor in Notes R4.6. In the rest of this article, we'll take a closer look at some of the OLE features in Notes. We'll first look at the three new NotesEmbeddedObject properties that are available in Notes R4.6.2 via LotusScript, and show you those properties in action. Then, we'll provide some tips for using specific OLE features in Notes, including examples of NotesFX and NotesFlow. Finally, we'll answer some common questions about OLE that have come up in the Notes/Domino forum on Notes.net. Downloading the sample database You can try out the techniques described in this article by downloading the following self-extracting database (185Kb):

Ole.exe

Note: The LotusScript examples in this database require that you use R4.6.2 or later. You can download R4.6.2 from Notes.net. The NotesFX examples work with any release of R4.x. An introduction to new OLE properties in R4.6.2 Notes R4.6 introduced four new properties for OLE and OCX objects: size object to window, size object below fields, run object when reading document, and update from document. You can set these properties manually by selecting the object and choosing menu options. For example, you can select a Lotus 1-2-3 OLE object and then choose Workbook - Object Properties, or you can select an OCX object, and choose Applet - Object Properties. In Notes R4.6.2, these properties (except for update from document) are now available via LotusScript. These properties can be very powerful in allowing you to make OLE/OCX objects work seamlessly in Notes. Below are descriptions of these properties, and comments concerning when and how to use them. FitToWindow The FitToWindow property sizes embedded objects to fit the document window. This property is available for embedded OLE objects and OLE controls (ActiveX or OCX). When you enable the FitToWindow property, the embedded object takes over the entire document window when activated. If the embedded object supports ActiveX documents (DocObject) and has requested this behavior from Notes, Notes only honors the request if FitToWindow or FitBelowFields is set. (An embedded object cannot have both this property and the FitBelowFields property set.) Since controls run when you open a document in edit mode (and in read-only mode when RunReadOnly is set), the object immediately takes over the window. OLE embedded objects take over the window when they are UI activated (for example, by double-clicking on the OLE object). As a result of the activation, any other objects or Notes fields are hidden. Because of this, we suggest that you use the FitToWindow property when you have only one embedded object on a document. This property is useful when you want users to be able to use their OLE application (or OLE control) and still be within a Notes document. For example, you can see this property at work when you use the Microsoft Office Library template (DOCLBM46.ntf), and when you use Lotus Word Pro or Microsoft Word as your default memo editor (choose File - Tools - User Preferences, click the Mail icon, and select an application in the Document Memo Editor field). For more information on the Microsoft Office Library template, see the article "Managing documents with the MS Office Library template." For more on the mail editor feature, see the article "Editing mail with Lotus WordPro or Microsoft Word." Defined in - NotesEmbeddedObject Data type - Boolean Syntax To get: flag = notesEmbeddedObject.FitToWindow To set: notesEmbeddedObject.FitToWindow = flag Legal Values True. Take over the entire document window when activated False. Do normal, in-place activation. This is the default.

FitBelowFields The FitBelowFields property sizes embedded objects to fit below the first layout region in the document. This property is available for embedded OLE objects and OLE controls (ActiveX or OCX). When you enable the FitBelowFields property, the embedded object takes over the entire document window below the layout region when activated. The UI behavior of the embedded object is the same as if it did not have FitBelowFields set. If the embedded object supports ActiveX documents (DocObject) and has requested this behavior from Notes, Notes only honors the request if FitToWindow or FitBelowField is set. (An embedded object cannot have both this property and the FitBelowFields property set.) The layout region and object behave in tandem, moving and sizing together, always keeping the same relative positions. Automatic scrolling of the layout region -- for when the window is sized to be smaller than the layout -- is disabled for this relationship. Since controls run when a document is opened in edit mode (and in read-only mode if RunReadOnly is set), the object immediately takes over the window below the layout region. OLE embedded objects take over the window below the layout region when they are UI activated. As a result of the activation, any other objects or Notes fields (except the layout region) are hidden. Because of this, we suggest that you use the FitBelowFields property when you have only one embedded object on a document. This property is useful to use when you have a form using a layout region on the top portion, and you want your embedded object to load below this layout region. This gives the user the ability to quickly select something in the layout region or work in the embedded object. Defined in - NotesEmbeddedObject Data type - Boolean Syntax To get: flag = notesEmbeddedObject.FitBelowFields To set: notesEmbeddedObject.FitBelowFields = flag Legal Values True. Take over the document window after first layout when activated False. Do normal, in-place activation. This is the default. RunReadOnly The RunReadOnly property runs the embedded object when users read the document. This property is available only for embedded OLE controls (ActiveX or OCX). When you enable the RunReadOnly property, the embedded control allows editing during read-only mode, but no changes are saved. The control is in-place activated (but not UI-activated) when the document is in read-only mode. Therefore, the property is not applicable to embedded OLE objects, since you can activate them in read-only mode without saving changes. This property is useful when you want to allow a user to activate an OLE control, and to also see the data while in read mode. (Many OLE controls do not load in read mode, and sometime do not even render data in read mode.) Of course, no changes are allowed during read mode. Defined in - NotesEmbeddedObject Data type - Boolean Syntax To get: flag = notesEmbeddedObject.RunReadOnly To set: notesEmbeddedObject.RunReadOnly = flag Legal Values True. Run the control when document is in read-only mode False. Do not run the control when the document is in read-only mode. This is the default. Update object from document This is the one object property that is not available via LotusScript, but we'll go ahead and talk about it here. The "Update Object from Document" property is available only for embedded OLE objects or OLE controls (ActiveX or OCX) on a subform or form. When you enable the "Update Object from Document" property, the embedded object is updated according to edits made via the document and not from the form (which is the default behavior). For example, embed either an OLE object or control on a form, and enable this property. When users create a document using the form, then edit the embedded object and save the document, their changes are saved. The next time you open the document, you'll see the new data in the embedded object, and not what was originally on the form. The new OLE properties in action The sample database contains three agents that demonstrate each of the new LotusScript properties, and an agent that clears the properties. Each agent cycles through each document and looks for an OLE/OCX with an object name of "Object Test." To see the properties at work, use the following steps: Note: To see the OLE control activation in this example, you need to have Lotus Components Sheet (version 1.2) installed on your system. To see the OLE object activation, you need to have one of the following: Paint, WordPad, Lotus 1-2-3 97, or 97. 1. Open the sample database. 2. To clear all properties for all documents in the database, choose Actions - Clear all properties. 3. Open the "Lotus Spreadsheet Component" document. Notice that you cannot activate this OLE control by double-clicking on the spreadsheet. (Note: If you do not have Lotus Components installed, you'll receive the error "The object's application or class is not available" and the spreadsheet will not activate. However, you can continue following these steps to walk through the different object properties.) 4. Put the document in edit mode (press CTRL+E), select the Spreadsheet component, and choose Applet - Object Properties. 5. In the Applet Object Properties, select "Run object when reading document":

6. Close the Properties box, and then save and close this document. 7. Reopen the "Lotus Spreadsheet Component" document and click on the spreadsheet. Notice that it now activates in read mode. You can add data; however, remember that you will not be allowed to save any changes since you are in read mode. 8. Close the document and choose Actions - Clear all properties. 9. Now, let's set the property by using an agent in this database. Choose Actions - Set RunReadOnly. The agent will cycle through all the documents in this view and enable the RunReadOnly property in any document that has an OLE control. 10. Open the "Lotus Spreadsheet Component" document and click on the spreadsheet. Notice that it again activates while in read mode. 11. Close the document and choose Actions - Clear all properties. 12. Now, let's try enabling another property with another agent. Choose Actions - Set FitToWindow. 13. Open the "Lotus Spreadsheet Component" document, put the document into edit mode, and click on the spreadsheet. Notice that the spreadsheet activates and "sizes to the window." 14. Open one of the other documents: Paintbrush, WordPad, Lotus 1-2-3 Workbook, or Excel Worksheet. Put the document into edit mode and notice that nothing happens. OLE objects will not fit to the window until they have been activated. (OLE controls behave differently; they actually load into memory when a document is opened.) 15. Double-click on the OLE object, and notice that now it fits to the window. 16. Close the document and choose Actions - Clear all properties. 17. Try one more example. Choose Actions - Set RunReadOnly, and then choose Actions - Set FitToWindow. 18. Now, open the "Lotus Spreadsheet Component" document. Notice that the OLE control fits to the window because you specified for it to run in read-only mode. 19. To verify that the RunReadOnly and SetFitToWindow properties were enabled by the agents, close the document, select it, and press CTRL+E (to edit the document). Choose Applet - Object Properties, and notice that both "Size object to window" and "Run object when reading document" are selected:

Tips for using OLE The following tips cover NotesFX and NotesFlow, with examples of each feature in action; drag-and-drop support; NotesLinks; OLE-related menu options; and some general OLE tips. NotesFX and NotesFlow NotesFX (Notes Field Exchange) is simply a field exchange between fields in a Notes document and predefined fields in an OLE application. Depending on the type of field, you can update the contents within Notes, and the data appears in the OLE application when it is activated from Notes. You can also update information in the OLE application, which will then update fields back in Notes. NotesFlow is an extension of NotesFX. NotesFlow allows you to publish Notes actions into embedded OLE objects. You can write LotusScript actions and make them available directly within an object's application. An action menu appears in the OLE application, which users can use, for example, to send a mail message along with the document. When you use NotesFlow along with various OLE object properties, you can create a custom template that helps users feel like they never left Notes. Here are some tips for using NotesFX and NotesFlow: · NotesFX and NotesFlow are supported on Windows 95, 98, and NT 4.0. You can use NotesFX and NotesFlow on Windows 3.1/3.11; however, the data exchange only works between 16-bit applications. The following applications support NotesFX and NotesFlow, with caveats noted: -- Lotus Components 1.2 -- Lotus SmartSuite 97 and SmartSuite Millenium Edition (1-2-3, Freelance, Word Pro, and Approach) -- Microsoft Office 97 (Excel, Word, and Power Point). Note that Word 97 has limited NotesFX support, and does not support NotesFlow. The reason is that Word 97 has issues with two-way field exchanges. Basically, blank fields seem to put Word 97 out of sync with NotesFX operations and may overwrite data with a blank field. This issue has been reported to Microsoft. -- Lotus SmartSuite 96 and Microsoft Office 4.0 (only on Windows 3.1/3.11). Note that NotesFX is not supported when using a 16-bit application with a 32-bit version of Notes (for example, NotesFX is not supported between SmartSuite 96 applications and the Win32 version of Notes). -- Visio 4.0 and higher Note: Microsoft Office 95 (Excel 7, Word 7, and PowerPoint 7) does not support NotesFX. · In order to exchange data between Notes and an OLE application, make sure that you have a one-to-one correspondence between the shared fields. Both the OLE server application and the Notes form must contain the same shared fields. You can set up NotesFX fields for one-way, two-way, and user-defined field exchanges. · NotesFX support is enabled by default in Notes forms. If you do not plan to use NotesFX, but you plan to use OLE objects (especially large OLE objects) on a form, you should disable NotesFX. This eliminates all NotesFX calls when an OLE object is activated and deactivated, which improves the overall performance and speed of the OLE object. To disable NotesFX for a form, choose Design - Form Properties, click the Defaults tab and select "Disable Field Exchange":

· If NotesFX is not working correctly, make sure that you have only one NOTES.INI file on your computer. Multiple copies of Notes (and thus, multiple copies of NOTES.INI files) can mislead an OLE application when it is trying to update Notes. OLE and NotesFX are very dependent on accurate Windows registry information. Most OLE objects, when activated, look for Notes in the registry, so information about Notes in the registry must be accurate. Reinstall Notes if you think that you have inaccurate information in your Windows registry. · Microsoft Word 97 has an issue with two-way field exchanges. Basically, blank fields seem to put Word 97 out of sync with NotesFX operations and may cause a blank field to overwrite some data. Microsoft is aware of this issue. If you would like to see an example of this, create a mail memo and leave the Subject field blank. In the Body field, choose Create - Object - Microsoft Word Document. This creates a Word OLE object. Click outside the Word object so that you are back in Notes. Enter a word in the Subject field (like FX). Right-click the Word OLE object and choose Open. Word launches out-of-place. Now, choose File - Properties and notice that the Subject field is still blank (it should contain the word FX). Close Word and notice that the Subject field is blank since Word sent back a blank Subject field. Now, try this procedure over again but first enter something in the Subject field and then create the Word object. Notice that the Subject field appears in Word correctly. For more information about NotesFX and NotesFlow, see the Lotus Notes Application Developer's Guide, which is part of the online help. Also, see your OLE application's documentation for information on how it supports NotesFX. OLE applications vary on how they support NotesFX. NotesFX in action The sample database includes an example of using NotesFX with Lotus 1-2-3 97. To see NotesFX at work, use the following steps: Note: This example requires that you have Lotus 1-2-3 97 installed.

1. Open the OLE/LotusScript sample database and choose Create - NotesFX example - using 123 97. The following document appears on the screen full of NoteFX fields.

The fields in blue are custom fields that we first created in a Notes form. Then, we embedded a 1-2-3 97 object on the Notes form with range names created for each of these fields. The red fields are examples of some standard document information fields, which 1-2-3 supports by default. 2. Click the "Add data to fields" action button to populate the blue and red fields. 3. Scroll down the document, and then right-click on the 1-2-3 OLE object and choose Open. This will open 1-2-3. Notice that the data from the blue fields gets exchanged into 1-2-3: 4. Check to see if the data from the red fields got exchanged in 1-2-3. To do this, choose File - Workbook Properties, and then select the General tab. The dialog box displays the information from the red fields on your Notes document: 5. To see a summary of all the NotesFX fields in 1-2-3, select the Notes/FX Fields tab:

6. Select the General tab again, and enter new text into the Subject field. 7. Switch back to your Notes document, and notice that the red Subject field has updated with your new text. 8. Switch back to 1-2-3 and close it. You are returned back to Notes. 9. To see another example of NotesFX using Excel 97, open the sample database and choose Create - NotesFX example - using Excel 97. Then, follow Steps 1 - 8 again. (Note: This example requires that you have Excel 97 installed.) As you can see, NotesFX constantly updates when you activate the OLE object, and when you deactivate the OLE object and return to Notes. NotesFX also captures any changes that you make to NotesFX fields while you are in the OLE application, and instantly sends these updates back to Notes. NotesFlow in action The sample database includes an example of using NotesFlow with Lotus Word Pro 97. To see NotesFlow at work, use the following steps: Note: This example requires that you have Lotus Word Pro 97 installed. 1. Open the sample database and choose Create - NotesFlow example - using Lotus Word Pro 97. The following document will appear with a Word Pro 97 object below the Body field. Notice that the document includes a "Forward OLE object" action button for forwarding the document you are currently in. This action button has also been enabled for NotesFlow. When the Word Pro object is activated, the action will be published to Word Pro and appears as a menu item in Word Pro. 2. Right-click the Word Pro object and choose Open. Word Pro launches. 3. Enter some text where Word Pro prompts you to "Click here to type Recipient's Name," "Click here to type Recipient's Address," and so on. 4. Within Word Pro, choose Actions - Forward OLE object. A mail message will be created with this new document along with the embedded Word Pro OLE object. You can forward this message to yourself or to a friend (just make sure they have Word Pro installed or they will not be able to edit the OLE object!) 5. To create your own NotesFlow action, edit the "NotesFlow example using Lotus WordPro 97" form, and choose Create - Action. 6. In the Action Properties, enter "Modify NewAction field" as the action name, and select "Include action in button bar" (which puts the action button above the document with other action buttons).

7. Select the NotesFlow Publishing tab. Then, select "Publish Action with OLE object" to get the action to appear in the OLE application, and select "Close OLE object and return to Notes" for what to do after the action has been chosen. Close the dialog box.

8. Now, in the formula pane, determine what the action will do. Select Simple actions, and click Add Action. 9. In the Add Action dialog box, select the "Modify Field" action, "NewAction" field, and enter a value. Select to replace the value, and click OK. Then, save and close the form. 10. Now you are ready to use your new NotesFlow action. Choose Create - NotesFlow example - using Word Pro 97. The same document appears. 11. Right-click the embedded Word Pro object and choose Open. Word Pro launches. 12. Once you are in Word Pro, choose Action - Modify NewAction field. This sends text back to the new action field in Notes and also closes Word Pro and returns you to the Notes document. You should now see that the new action field has been updated. Drag-and-drop support Drag-and-drop is a very quick method of copying and linking existing data from an OLE application into Notes. Every application seems to implement drag-and-drop support a bit differently. So, for information on how to use drag-and- drop with different applications, see the sidebar "Using drag-and-drop options with different OLE applications." Also, see your OLE application's documentation for information on its OLE drag-and-drop support. Here are some tips for using drag-and-drop: · Instead of trying to size and fit two applications in one window, remember that you can drag-and-drop to the Windows' taskbar. For example, create a new document in Notes and then minimize Notes. Now, open your OLE application. Select your data, and then drag-and-drop it on top of the Notes icon on the Windows taskbar. The Notes window opens and then all you need to do is drop the data into the Notes rich text field. · If drag-and-drop is not working for you, remember that you can copy your data from the OLE application, switch back to Notes, and choose Edit - Paste Special. The Paste Special dialog box gives you a choice of Pasting or Paste linking with different display formats. The different display formats available depend on what the OLE application supports. Notes Links Notes Links can make Notes act as an OLE server. You have been able to embed OLE objects into Notes for quite awhile now. Well, you can also put Notes objects into other applications too. To use Notes Links: 1. Go to any Notes view, and choose Edit - Copy As Link, and select either Document Link, View Link, or Database Link. 2. Switch to another OLE application, and choose Paste Special - Link. 3. Select the default format (sometimes shown as a Notes Object Link or Picture), and you'll see a Notes icon appear. This is an OLE link back to your Notes database, view, or document. Notes Links can be useful when you want to access a Notes database or document quickly from within an OLE application. There are some performance issues to consider. In addition, activating a Notes Link launches Notes and prompts you for a password. Finally, you need to use the correct location setup so your database can be found. OLE-related menu options Here are some tips for using the OLE-related menu options: · Cut and Copy -- cuts or copies the entire object using the Notes internal clipboard With the internal clipboard, Paste pastes the entire object, while Paste Special pastes a bitmap representation of the object · Copy External -- copies the entire object to the Windows' clipboard for an external application. A Paste Special within Notes or with another OLE application allows the pasting of the entire object. Using Paste in Notes or with an external application results in a bitmap representation of the object. · Edit -- only available for applications which support in-place editing. Most OLE2 applications support this option. · Open -- launches the selected OLE object out-of-place. All OLE applications support this option. · Display As -- allows the user to change the display of an OLE object. You have five options to choose from, although not all OLE applications support all five display formats: --Picture - shows only the first page of the OLE object. (Default) --Bitmap - similar to the Picture option --Rich Text - displays all the data for the OLE object --Text - displays only text. (not many applications support this option) --Icon - displays the icon for the OLE application General OLE tips To wrap this up, here are some general OLE tips: · If you do not want an OLE object to default to in-place editing when users double-click on the object, you can display the object as an icon. When first embedding the OLE object, select the Object type and choose Display as Icon. If you have already embedded the OLE object, right-click on the OLE object, choose Display As and select icon. · If you have trouble inserting an OLE object or control into Notes, first try embedding it into another application. If this does not work, you know that the problem is with the other application. If it does work, then you probably have a configuration problem in Notes. · If the OLE object you want to edit is very large (for example, a spreadsheet containing several hundred lines), you should not edit the object in-place (by double-clicking on the object, or by choosing Edit from the OLE application menu). Instead, right-click on the object and choose Open. Then, you can edit the object in the application. Common questions Now, let's look at some common questions about OLE that have come up in the Notes/Domino forum on Notes.net. And, more importantly, let's find out the answers to those questions. Can you use LotusScript to change the display of an OLE object? No, this functionality has not yet made it into LotusScript. OLE objects created via the back-end embed as a generic icon. You can manually change the display of an OLE object; however, you cannot automate this procedure. Does LotusScript support NotesFX? NotesFX is only enabled for use with the front-end (UI) OLE LotusScript classes. The back-end OLE LotusScript classes (LSBE) do not support NotesFX. Do any of the Notes templates use OLE and LotusScript? Yes, the Microsoft Office Library template (DOCLBM46.NTF) primarily uses LotusScript to create OLE objects. You can see this code in the OLERoutines form in the Script Libraries. The code uses two main events for OLE: the Declarations event and the GetOrCreateOLEObject event. For more information on the Microsoft Office Library template, see the article "Managing documents with the MS Office Library template." Also, the mail template for Notes 4.6 uses LotusScript to implement the Document Memo Editor feature. This feature allows you to use either Lotus WordPro or Microsoft Word as your default mail editor. For more information on this feature, see the article "Editing mail with Lotus WordPro or Microsoft Word." Can you have multiple versions of Notes installed and still use OLE? Technically, you should be able to use OLE features, such as embedding objects into Notes, when you have multiple versions of Notes installed. However, when some applications are embedded into Notes, they check for Notes in order to support NotesFX or OLE links. These applications may generate errors if they find an older version of Notes installed. The Windows registry can only register one version of any software program, so the last version of Notes installed takes precedence over the previous version installed. Given this issue, we highly recommend that if you plan to use OLE with Notes, you only have one version of Notes installed. Is LotusScript going away? No. In fact, LotusScript is alive and well in Notes R4.6x and in Notes R5. Several templates continue to make extensive use of LotusScript. Can you create OLE objects in Microsoft Office 97, and use them with Microsoft Office 95? No. OLE objects are upward compatible, but not backward compatible. The best way to avoid this issue is to standardize on one version.

Does Domino support editing OLE objects via a Web browser? No. Domino currently renders an OLE object as a bitmap, which you cannot edit via a Web browser. However, we are looking into a cross-platform solution for making this work for a browser. Your best solution now is to create a Java applet. You can create Java applets with the Lotus eSuite Devpack, which Domino fully supports. When embedding or activating an OLE object or OLE control into Notes, why does the following error occur: "Error has occurred while processing request on object"? This is a very generic error that can indicate several things. You should look into the following areas: · Do you have multiple versions of Notes installed? When you embed an object into Notes, the object may search for Notes, and cause an error when it finds multiple copies. Try installing one version of Notes. · Is the application corrupt, missing files, or has it recently been moved? The Windows registry may still list the object as being installed in another directory. Unless you are comfortable with editing the Windows registry, try reinstalling the OLE application. · Is the OLE control insertable? You can only embed some OLE controls through programmable interfaces like LotusScript or . Verify whether the control is insertable by looking in your Windows registry under \\HKEY_CLASSES_ROOT, finding your application and seeing if insertable is listed. · Do you have AutoSave enabled in the application? This issue is still under investigation by Notes development; however, disabling AutoSave is a work-around for the issue. Keeping the other application loaded while using Notes will solve this issue too. · Are you low on memory? Shut down all applications and restart the computer. · Did the OLE object get corrupted? This can occur with large OLE objects of 5MB or greater. The corruption seems to occur over a period of time, after dozens of edits on an OLE object. This issue has been addressed in both Notes R4.6.3 and R5. Where can I go for more information on using OLE and LotusScript in Notes? Notes Help includes many examples along with the Notes Programmer's Guide. If you use Lotus SmartSuite, there are some handy LotusScript references guides for all the SmartSuite applications and also one for Lotus Notes. Conclusion See, OLE is not all that intimidating and can actually be your friend! OLE is a very powerful tool for sharing and/or linking data within Notes and also outside of Notes. You can quickly develop a workflow application using NotesFX and NotesFlow, or use a template like the Microsoft Office Library template (DOCLBM46.NTF) or Lotus SmartSuite Library template (DOCLIBL4.NTF) to get workflow capabilities right out-of-the-box. We've briefly touched on how you can use LotusScript and agents with OLE in Notes. The combination can be quite powerful, yet it can be difficult to find help when working with other OLE applications, since each OLE application works differently in the OLE automation world. This entire subject really warrants an entire article to itself. However, we hope that we've answered some of your questions, and given you some new ideas to try when designing applications with Notes.

ABOUT THE AUTHOR John Thornton has been at Iris for almost 1 1/2 years working as a software quality engineer in the areas of OLE and Java applets. Prior to that, he worked at Lotus for 8 years in Notes QE and in Lotus Technical Support. He has an MBA from Rivier Collge in Nashua, NH and a BS in Business Management from Merrimack College in North Andover, MA. He enjoys ice hockey (crazy goalie), skiing, traveling, and photography.

Copyright 1999 Iris Associates, Inc. all rights reserved. Using drag-and-drop options with different OLE applications (sidebar) Follow these steps to use drag-and-drop with different OLE applications: 1. Before you drag-and-drop anything into Notes, make sure you have first saved the file in your OLE application. This is required if you want to link your data into Notes, since you cannot link to an unsaved file. 2. Arrange the program windows so that both the source file (OLE application) and Notes are open and visible. 3. Select the information, and then follow the instructions below for the specific application that you are using:

Application Drag-and-Drop, Drag-and-Drop, Drag-and-Drop, with Cutting-and Pasting with Copying with Copy Linking Lotus 1-2-3 97 1-2-3 97 does not support Position the mouse pointer Position the mouse pointer this method of drag-and- on the border of your on the border of your drop. (It supports copying, selection so that the pointer selection so that the pointer not cutting.) changes to a hand. While changes to a hand. While holding down the left mouse holding down the left mouse button, drag the selection button, press CRTL+SHIFT over to Notes (once you and drag the selection over drag outside of 1-2-3, a plus to Notes (once you drag sign appears). Now, release outside of 1-2-3, an equals the mouse button as you sign appears). Now, release move over the rich text field the mouse button as you in Notes. move over the rich text field in Notes.

Lotus Freelance 97 Freelance does not support Select the object to copy, or Select the object to copy, or this method of drag-and- if you want an entire page or if you want an entire page or drop. (It supports copying, pages, switch to the Page pages, switch to the Page not cutting.) Sorter View. Postion the Sorter View. Postion the mouse pointer on the border mouse pointer on the border of your selection. While of your selection. While holding down the left mouse holding down the left mouse button, drag the selection button, press CRTL+SHIFT over to Notes. Now, release and drag the selection over the mouse button as you to Notes. Now, release the move over the rich text field mouse button as you move in Notes. over the rich text field in Notes.

Lotus Word Pro 97 Word Pro does not support Position the mouse pointer Position the mouse pointer this method of drag-and- on the border of your on the border of your drop. (It supports copying, selection so that the pointer selection so that the pointer not cutting.) changes to a hand. While changes to a hand. While holding down the left mouse holding down the left mouse button, drag the selection button, press the over to Notes (once you CRTL+SHIFT and drag the drag outside of Word Pro, a selection over to Notes plus sign appears). Now, (once you drag outside of release the mouse button as Word Pro, an equals sign you move over the rich text appears). Now, release the field in Notes. mouse button as you move over the rich text field in Notes. Microsoft Excel 97 Position the mouse pointer Position the mouse pointer Excel 97 does not support on the border of your on the border of your drag-and-drop linking selection so that you see a selection so that you see a outside of Excel (As a pointer. While holding down pointer. While holding down workaround, you can copy the left mouse button, drag the left mouse button, press data to the clipboard, choose the selection over to Notes the CTRL key (you should Edit - Paste Special, and (once you drag outside of immediately see a plus sign select Paste link to source). Excel, a plus sign appears on the mouse pointer), and on the mouse pointer). Now, drag the selection over to release the mouse button as Notes. Now, release the you move over the rich text mouse button as you move field in Notes. (TIP: To over the rich text field in prevent scrolling when you Notes. drag information, drag quickly over to Notes or hold down the ALT key as you drag).

Microsoft PowerPoint From the Page Sorter View, From the Page Sorter View, PowerPoint 97 does not 97 position the mouse pointer position the mouse pointer support drag-and-drop on the border. While holding on the border. While holding linking outside of PowerPoint down the left mouse button, down the left mouse button, (As a workaround, you can drag the selection over to press the CTRL key (you copy data to the clipboard, Notes (once you drag should immediately see a choose Edit - Paste Special, outside of PowerPoint, a plus sign on the mouse and select Paste link to plus sign appears with the pointer), and drag the source). mouse pointer). Now, selection over to Notes. release the mouse button as Now, release the mouse you move over the rich text button as you move over the field in Notes. rich text field in Notes.

Microsoft Word 97 Position the mouse pointer Position the mouse pointer Position the mouse pointer on the border of your on the border of your on the border of your selection so that you see a selection so that you see a selection so that you see a pointer. While holding down pointer. While holding down pointer. While holding down the left mouse button, drag the left mouse button, press the left mouse button, press the selection over to Notes the CTRL key (you should CTRL+SHIFT (you should (once you drag outside of immediately see a plus sign immediately see a plus sign Word, a plus sign appears on the mouse pointer), and on the mouse pointer), and with the mouse pointer). drag the selection over to drag the selection over to Now, release the mouse Notes. Now, release the Notes. Now, release the button as you move over the mouse button as you move mouse button as you move rich text field in Notes. over the rich text field in over the rich text field in Notes. Notes.

Copyright 1999 Iris Associates, Inc. all rights reserved.