Home Forums General XMetaL Discussion overriding paste functionality for Edit (menu) > Paste Reply To: overriding paste functionality for Edit (menu) > Paste

Derek Read

Reply to: overriding paste functionality for Edit (menu) > Paste

Assigning 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.Alert(“Changing text to UPPERCASE…”);
Application.Clipboard.Text = Application.Clipboard.Text.toUpperCase();
]]>
[/code]

The Programmer's Guide topic “When text is dropped” documents these events (and more).

Reply

Products
Downloads
Support