|SAS Companion for the Microsoft Windows Environment|
SAS provides three items on the object Selection List to facilitate OLE:
These three items correspond to the three OLE classes in SAS/AF software: INSERT, PASTE, and READOLE.
In addition to using the Selection List to insert objects, you can select and drag objects from other Windows applications and drop them onto an open FRAME entry (in BUILD mode, or during run time if the frame or work area object is registered as a drop site for the SAS_DND_OLEOBJ representation).
|Inserting an OLE Object|
To insert an OLE object in a FRAME entry:
Alternatively, you can create an object from a file by clicking on Create from File. The file you specify must have been created by one of the applications you have available to supply OLE objects. For example, if you have Microsoft Excel installed on your system, you can create an object from an Excel spreadsheet file. You also have the option of making it a linked object (instead of embedded). For more information about linked objects, see Using Linked OLE Objects.
When you have selected the type of object or filename to insert, click on [OK]. SAS then displays the OLE - Insert Object Attributes dialog box.
Note: The HSERVICE entry is not created until you Save or End the FRAME editing
Click on [OK]. SAS inserts the object in the FRAME entry, displaying a representation of the object at the position you selected. If you are creating the object as new (that is, you are not creating it from an existing file), then the object automatically enters an editing session with the server. If the object server supports visual editing, then this editing session uses visual editing. For more information about visual editing, see Editing an OLE Object within a FRAME Entry.
|Pasting an OLE Object from the Clipboard|
To paste an OLE object from the Windows clipboard:
Note: If you paste data from a temporary source (such
as a document that you did not save), SAS will be unable to locate the data
source when it attempts to link to it later when it no longer exists. You
should save your data file before copying it to the Windows clipboard.
Click on [OK]. SAS pastes the object in the FRAME entry, displaying a representation of the object at the position you selected.
|Reading an OLE Object from an HSERVICE Entry|
To read an existing OLE object stored as an HSERVICE entry in a SAS catalog:
Click on [OK]. SAS inserts the object in the FRAME entry, displaying a representation of the object at the position you selected.
Note: You cannot change the name of an HSERVICE entry
that you read in. If you want to assign a different name to the HSERVICE entry,
copy the HSERVICE entry to a new name before you read the object.
|Inserting an OLE Object Using Drag and Drop|
To insert an OLE object into a FRAME entry by dragging and dropping it:
When you release the mouse button ("dropping" the object), SAS inserts the object into the FRAME, automatically creating a name and an HSERVICE entry for the OLE object. SAS displays a representation of the object at the position you selected.
You can allow the dragging and dropping of OLE objects while your SAS/AF application is running. To enable this, you must register the OLE object type with a valid drag and drop representation.
OLE objects must be registered with the SAS_DND_OLEOBJ
representation. For more information about registering objects for drag and
drop, see SAS/AF Software: FRAME Application Development Concepts and the Widget Class in SAS/AF Software: FRAME Class Dictionary.
By default, dragging an OLE object from another application into SAS moves the object (unless the object is of a type that can only be read and not removed). You can override this default action by using a drag modifier; that is, a key press that indicates that you want to perform a different drop action:
Alternatively, you can initiate a nondefault drag and drop action (if the server application supports it). Use the right mouse button to select the object and drag and drop it into the FRAME entry. When you release the mouse button, SAS displays a pop-up menu allowing you to select whether to move, copy, or link to the object. The choices in the pop-up menu might vary among different types of OLE objects.
Top of Page
Copyright 1999 by SAS Institute Inc., Cary, NC, USA. All rights reserved.