Results 1 to 5 of 5
  1. #1
    Lounger
    Join Date
    Jan 2001
    Location
    Karlsruhe, Germany
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Clearing Undo Buffer

    Hello,

    How can I clear the undo buffer in a Word97 macro. I think it might solve a crashing problem I am having. Somewhere I read that there is trick for doing this (and that it doesnt work in Word 2000), but I cant find it anywhere.

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Clearing Undo Buffer

    Ed,

    You didn't say if you want the actions undone or not. So the first statement clears the undo list AND undoes all actions in the list. The second just clear the list (probably what you want).

    1. activedocument.undo(-1)

    2. activedocument.undoclear
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Los Angeles Area, California, USA
    Posts
    7,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Clearing Undo Buffer

    This was a way that worked in Word 6 & 7, but should also work in later versions. Protect & then unprotect the document OR turn revisions on & then off. I had <A target="_blank" HREF=http://support.microsoft.com/support/kb/articles/Q118/9/87.asp>this</A> article listed for the earlier versions of Word.

    Hope this helps.

  4. #4
    Platinum Lounger
    Join Date
    Feb 2001
    Location
    Yilgarn region of Toronto, Ontario
    Posts
    5,453
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Clearing Undo Buffer

    caveat about losing Forms data? There is a workaround for THAT too .....

  5. #5
    Lounger
    Join Date
    Jan 2001
    Location
    Karlsruhe, Germany
    Posts
    48
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: Clearing Undo Buffer

    > turn revisions on & then off.

    Now I remember: somewhere I read that this is no longer recommended as it does not work in Word2000...

    Thanks,

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •