Undo/Redo hooking

A

Alex

Hello,

How can I override the default processing of the toolbar Undo/Redo buttons and dropdowns?

EditUndo() and EditRedo() macros work with the corresponding keyboard and menu commands but have no effect on the toolbar buttons.

Thanks.


Best wishes,
Alex.
 
K

Klaus Linke

Hi Alex,

It seems you can only override the click on simple button controls. For the more advanced controls, Microsoft forgot(?) to implement interception.
And Word doesn't have simple built-in button controls for EditUndo and EditRedo anymore... You'd need to make your own controls to be able to intercept them. The things you can use are the button faces (FaceID=128 and 129).

:-( Klaus
 
K

Klaus Linke

Alex said:
Maybe the resident Microsoft representatives will be able to offer a solution?

There aren't many Microsoft employees hanging around in the Word newsgroups. If they do, it's usually not as representatives.

You can post a suggestion for Microsoft to the newsgroups, and Microsoft has promised to read those and to reply to a few that get a lot of feedback. You have to use the web interface for that, though:
http://www.microsoft.com/communities/newsgroups/default.mspx

What do you plan to do with your macros that intercept Undo/Redo? Maybe there's another way to achieve the same result?

Regards,
Klaus
 
A

Alex

Klaus said:
There aren't many Microsoft employees hanging around in the Word
newsgroups. If they do, it's usually not as representatives.

That's why I crossposted to microsoft.public.office.developer.com.add_ins.
I have had good experience with Wei-Dong XU and Peter Huang from MSFT
answering these questions.
You can post a suggestion for Microsoft to the newsgroups, and
Microsoft has promised to read those and to reply to a few that
get a lot of feedback. You have to use the web interface for that, though:
http://www.microsoft.com/communities/newsgroups/default.mspx

As I am an MSDN subscriber and using a valideted account to post,
MSFT guarantees a reply within 48 hours (I think).
Now if I get a satisfactory reply from you, Cindy or any of the other
resident experts, they will not bother chiming in.
Otherwise, they've been pretty diligent following up with suggestions.
What do you plan to do with your macros that intercept Undo/Redo?
Maybe there's another way to achieve the same result?

I am writing a Word add-in.
Without getting into details, the add-in creates bookmarks, variables
and performs some other operations, all of which have to be synchronized.

Unfortunately, some of these operations are undo-able and if the user
choses to undo them, the document may remain in an inconsistent state
(at least from the add-in's perspective).

Therefore, whenever the user wishes to undo a partial operation, I
need to hijack the operation and iteratively undo the whole group of
operations. Similarly with "redo".

See
http://groups.google.ca/group/microsoft.public.word.word97vba/msg/c5f120a7817f3dbb for details.


Best wishes,
Alex.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top