Was this page helpful?
Your feedback about this content is important. Let us know what you think.
Additional feedback?
1500 characters remaining
MSDN Library

HTMLLinkElementEvents::oncopy Event

Fires on the source element when the user copies the object or selection, adding it to the system clipboard.



Return Value

If the event bubbles and is cancellable, return VARIANT_TRUE to prevent the event from bubbling to other event handlers in the document tree. Return VARIANT_FALSE to allow bubbling.



The DISPID for this event is defined in mshtmdid.h. Use this value to identify the event handler when implementing IDispatch::Invoke.

Event Information

Bubbles Yes
Cancels Yes
To invoke
  • Right-click to display the shortcut menu and select Copy.
  • Or press CTRL+C.
Default action Duplicates the selection.


Use the IHTMLDataTransfer::setData method to specify a data format for the selection.

See Also

Community Additions

© 2015 Microsoft