Re: Undo list: figuring out how many times to undo
- From: Phonon <andrew3z@xxxxxxxxx>
- Date: Wed, 01 Aug 2007 17:20:12 -0000
On Aug 1, 12:46 pm, "Jonathan West" <jw...@xxxxxxxx> wrote:
"Phonon" <andre...@xxxxxxxxx> wrote in message
news:1185978705.859095.254900@xxxxxxxxxxxxxxxxxxxxxxxxxxxxxxx
Hi All,
I'm developing a plug-in for Microsoft Word which performs a series
of actions at the user's request. I would like that series of actions
to be considered as 'one' action in the undo list. Is there way to do
this? Worst case scenario, is there a way to count how many items
there are in the undo list at any time? (that at least would allow me
to take a snapshot before and after the command and undo the
appropriate number of times).
Thank you in advance,
Andrew
The way to approach this is for you to insert a bookmark at the start of
your series of actions. Delete it at the end.
Then you create an EditUndo macro that does the following
1. Undo one action.
2. Check to see if the bookmark is present.
3. If it isn't present, stop.
4. Go to step 1.
This will cause all your actions to be undone as if they were one item.
--
Regards
Jonathan West - Word MVPwww.intelligentdocuments.co.uk
Please reply to the newsgroup
Sweet! Thank you!
Andrew
.
- References:
- Undo list: figuring out how many times to undo
- From: Phonon
- Re: Undo list: figuring out how many times to undo
- From: Jonathan West
- Undo list: figuring out how many times to undo
- Prev by Date: Re: Undo list: figuring out how many times to undo
- Next by Date: Upgrading to Office 2007 causes VS 2005 app not to compile
- Previous by thread: Re: Undo list: figuring out how many times to undo
- Next by thread: Upgrading to Office 2007 causes VS 2005 app not to compile
- Index(es):
Relevant Pages
|