Re: Undo event by Praful
Praful
Wed Aug 17 06:11:01 CDT 2005
thanks,
i have tried that with 2 different bookmarks and that too working fine.....
thanks again
"Jezebel" wrote:
> No, there is no way to manage the undo stack other than to clear it
> completely. There is no Undo object as such, nor any methods for
> manipulating it. (And there bloody well ought to be!)
>
> If you have a bookmark defined in your document, and you change what the
> book refers to -- ie, you reset the bookmark's Range property -- that
> consitutes an event in the Undo list. Simplest is:
>
> ActiveDocument.Bookmarks("_UndoMarker").End = 0 ' or .End = 1
>
> That instruction inserts 'Change bookmark' into the Undo stack.
>
>
>
>
>
> "Praful" <Praful@discussions.microsoft.com> wrote in message
> news:12158866-3024-468E-AFDC-A9D4FAA902B0@microsoft.com...
> > Thanks a lot for the suggestion.
> >
> > So is it sure that there is no option of restricting the events to be
> > added
> > to the Undo Stack.
> > And can you please tell me that what you basically mean by Bookmark
> > changing
> > again??????
> >
> > GS
> >
> > "Jezebel" wrote:
> >
> >> There's no direct way to do it. There are several methods you can write
> >> for
> >> grouping a series of undo instructions (I assume you're trying to undo
> >> entire macro sequences) -- the trick is to put 'marker' instruction into
> >> the
> >> undo stack at the beginning and end of your macro sequence. An easy
> >> choice
> >> is to add a hidden bookmark (name begins with an underscore) and set it
> >> to
> >> point to the beginning or end of the document. (Even if the document is
> >> empty, these are different locations.)
> >>
> >> When the user clicks Undo, undo one instruction and check if the bookmark
> >> has changed. If so, keep on undoing until it changes again. And vice
> >> versa
> >> for Redo.
> >>
> >>
> >>
> >> "Praful" <Praful@discussions.microsoft.com> wrote in message
> >> news:07FDAEBF-CC96-48F4-A1DF-431331C1B9B3@microsoft.com...
> >> > Hello All,
> >> >
> >> > 1/ Is it possible that we somehow restrict word to add entries in Undo
> >> > stack.
> >> > else
> >> > 2/ Is it possible that we group some events as one Undo event.
> >> >
> >> > Please help as i am making a addin for office in vb.net
> >> >
> >> > GS
> >>
> >>
> >>
>
>
>