Home › Forums › General XMetaL Discussion › overriding paste functionality for Edit (menu) > Paste › Reply To: overriding paste functionality for Edit (menu) > Paste
Reply to: overriding paste functionality for Edit (menu) > Paste
March 27, 2009 at 11:30 pmAssigning the Ctrl+V shortcut does not affect menu items or toolbar buttons (if you wanted to replace that functionality you'd need to add a new menu item or toolbar button, and then optionally remove the existing ones).
What you want to do is best accomplished using one of these event macros:
- On_Document_Before_DropText
- On_Application_Document_Before_DropText.
Here's an example that changes any text you paste to uppercase for a particular document type:
[code]
Application.Clipboard.Text = Application.Clipboard.Text.toUpperCase();
]]>
The Programmer's Guide topic “When text is dropped” documents these events (and more).