Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

PowerPoint COM Add-In - implementing Undo/Redo

Posted on 2014-04-01
4
Medium Priority
?
634 Views
Last Modified: 2014-04-22
I have a PowerPoint COM Add-In.  The actions it performs are not put on the Undo stack by PowerPoint, so PowerPoint's Undo does not work.  This seems to be a long-standing documented issue.

I have cobbled together some sort of shaky solution by running the line CommandBars.ExecuteMso('HideBackgroundGraphics') before each action the Add-In performs that changes the presentation.  This has the effect of placing the "Background" command in the Undo stack and allows the user then to Undo and get to that point.

This sort-of works but has three disadvantages:

1) The command I use in the ExecuteMso is as neutral a one as I could find (I tried loads including HideSlide and then setting it back manually, but nothing seemed as uninvasive as this) - but this still MAY upset some user, sometime.

2) This method means that there are two entries in the Undo stack so the user has to click twice.  Not too major a price to pay.

3) More serious is that fact that after Undo-ing the action, Redo does not work!!  In some way the state is compromised and the Background command has disappeared.

My question is - has anyone successfully implemented undo in this (or any other) way.  Do you have a fix particularly for point 3?

Many thanks for your help

Richard Teller
0
Comment
Question by:rteller00
[X]
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
  • 2
  • 2
4 Comments
 
LVL 23

Expert Comment

by:JSRWilson
ID: 39969998
I don't write COM addin (only ppam) but in vba for 2010 onwards there's a new method

Application.StartNewUndoEntry

John
0
 

Author Comment

by:rteller00
ID: 40002410
Thanks, John.  Problem is that many of our clients are still 2007 and I'd really like to find a comprehensive solution if possible.
0
 
LVL 23

Accepted Solution

by:
JSRWilson earned 1500 total points
ID: 40003313
There's no answer in 2007.
0
 

Author Closing Comment

by:rteller00
ID: 40016138
Thanks, John.
0

Featured Post

Free Tool: Site Down Detector

Helpful to verify reports of your own downtime, or to double check a downed website you are trying to access.

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

Setting the Scene PowerPoint is a creative tool in the right hands but it also includes a much underutilised programming dimension. In this beginner level article, we're going to show you some of some key elements of programming PowerPoint using th…
Introduction In all recent versions of PowerPoint it is possible to trigger animations. This means the animation takes place when a certain shape is clicked. This allows you to run animation “on demand” and outwith the normal sequence of mouse cl…
This video teaches viewers how to create handouts from their slides and helps them decide how many slides to include per handout.
The viewer will learn how to edit the master slide. They will also learn how to combine multiple themes into one master slide to use them in their presentation.

688 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