Discussion:
Undo/Redo buttons hooking
(too old to reply)
Alex
2005-05-17 21:12:11 UTC
Permalink
Maybe the resident Microsoft representatives will be able to offer a solution?
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.
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 Linke
2005-05-17 22:18:32 UTC
Permalink
Post by Alex
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
Post by Alex
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.
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).
Alex
2005-05-17 23:10:13 UTC
Permalink
Post by Klaus Linke
Post by Alex
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.
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.
Post by Klaus Linke
You can post a suggestion for Microsoft to the newsgroups, and
Microsoft has promised to read those and to reply to a few that
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.
Post by Klaus Linke
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.
--
Address email to user "response" at domain "alexoren" with suffix "com"
Loading...