PasteOK Property

       

Returns a value that determines whether the contents of the system Clipboard can be pasted into the OLE container control.

Syntax

object.PasteOK

The object is an object expression that evaluates to an object in the Applies To list.

Remarks

When this property setting is True, you can paste the contents of the system Clipboard into the OLE container control.

Use the OLETypeAllowed property to specify the type of object ( linked or embedded) you want to paste into the OLE container control. Once you successfully paste an object into the OLE container control, you can check the OLEType property setting to determine the type of object that was created.

You can use this property if your application supports a Paste command on an Edit menu. If PasteOK is False, disable the menu command; otherwise, it can be enabled. Enable and disable menu commands by setting their Enabled property to True or False, respectively.

You paste an object into the OLE container control with the Paste method.

To provide more flexibility to the user, display a Paste Special dialog box when the user chooses the Edit Paste command. (Set OLETypeAllowed = 2, and then use the PasteSpecialDlg method.) When this dialog box is displayed, an object is pasted onto the system Clipboard based on the user's selections in the dialog box.