How to Capture the Paste event in Outlook editor

Add-in Express™ Support Service
That's what is more important than anything else

How to Capture the Paste event in Outlook editor
 
keni zhou


Guest


Dear Sir,

I want to capture the paste event when paste something to Outlook editor, but there is not any chance to capture the 3 Paste option button events("Keep source formatting","Merge formatting","Keep text only").

And I also notice that you have post a solution for Excel at:
https://www.add-in-express.com/forum/read.php?FID=5&TID=12832

But that seems not work in Outlook, I cannot find out the "Undo" control by "Globals.ThisAddIn.Application.ActiveExplorer()..CommandBars["Standard"].Controls["&Undo"];".

So I would like to know how to find the "Undo" button in Outlook, and any other workable workaround?


Many Thanks!!!
Posted 12 Oct, 2018 09:45:14 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Hello Keni,

You can't use that solution in Outlook because calling {Explorer or Inspector}.CommandBars produces an exception; I assume this is by design.

Consider providing custom buttons to imitate (with restrictions) the functionality that the controls in the Paste gallery provide.


Andrei Smolin
Add-in Express Team Leader
Posted 15 Oct, 2018 04:42:48 Top
keni zhou


Guest


Thanks your reply.

Yes, I added a custom paste button and the problem solved.


Thanks!
Posted 19 Oct, 2018 09:56:51 Top
Andrei Smolin


Add-in Express team


Posts: 18794
Joined: 2006-05-11
Great!


Andrei Smolin
Add-in Express Team Leader
Posted 22 Oct, 2018 04:46:42 Top