Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people, just like you, are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
Solved

Office Undo... Export to Array?

Posted on 2014-03-04
3
416 Views
Last Modified: 2014-03-05
Hi All

I am wondering if it is possible to export the undo history from MS Word / MS Excel and if there is simple (fast) code to achieve this.

I would be happy to fill an array / scripting dictionary / table with the descriptions of the available Undo Actions.

Any thoughts on how to achieve?

Kind regards,
0
Comment
Question by:DrTribos
  • 2
3 Comments
 
LVL 81

Accepted Solution

by:
zorvek (Kevin Jones) earned 500 total points
ID: 39905586
The undo buffer is not available to us via the application object model so, no, you can't export it or access it in any way.

This has been a bone of contention with Microsoft for years as it makes controlling the undo buffer impossible. Did you know that the entire buffer is cleared when certain properties are set or methods invoked from VBA?

Kevin
0
 
LVL 15

Author Comment

by:DrTribos
ID: 39905607
Thank you for your comments, explains why I keep hitting a brick wall!

No I did not know that, can you provide a few examples?
0
 
LVL 81

Expert Comment

by:zorvek (Kevin Jones)
ID: 39905652
Basically setting any worksheet property or invoking a method that changes a worksheet will reset (clear) the undo buffer. An example is accessing the UsedRange object. Any time the Worksheet.UsedRange property is accessed, the undo buffer is cleared.

This makes sense if you think about it. The undo buffer contains specific instructions to undo user actions. If VBA code executes and starts monkeying with the worksheet, that runs the risk of rendering the undo buffer's instructions obsolete. Rather than write mountains of logic to handle all possible cases - or record every VBA invoked worksheet change in the buffer, Microsoft chose to just clear the buffer when ANY worksheet property is changed from VBA. Easy solution to a very difficult problem.

Kevin
0

Featured Post

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Using Word 2013, I was experiencing some incredible lag when typing.  Here's what worked for me....
This code takes an Excel list of URL’s and adds a header titled “URL List”. It then searches through all URL’s in column “A”, looking for duplicates. When a duplicate is found, it is moved to the top of the list. The duplicate URL’s are then highlig…
This Micro Tutorial well show you how to find and replace special characters in Microsoft Word. This is similar to carriage returns to convert columns of values from Microsoft Excel into comma separated lists.
This Experts Exchange video Micro Tutorial shows how to tell Microsoft Office that a word is NOT spelled correctly. Microsoft Office has a built-in, main dictionary that is shared by Office apps, including Excel, Outlook, PowerPoint, and Word. When …

856 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question