Problem with Undo in VB.NET com add-in for PowerPoint

M

Mike

I've written a com add-in for PowerPoint with VB.NET using IDTExtensibility2
as a new version of an existing VBA solution. The addins contain some simple
dialogs to help format shapes to predefined settings.

Everything works ok except that if I activate my add-in multiple times to
format different shapes then PowerPoint's built-in Undo feature behaves
slightly differently depending on whether I'm using the VBA or VB.NET version.

In the VBA solution PowerPoint seems to mark an 'undo point' after each
activation of the add-in so I can undo each change in turn, but when I use
the VB.NET version PowerPoint only stores a single undo point.

The only way round it I've found so far is to perform some other interaction
with PowerPoint (e.g. nudge a shape) after each activation of the VB.NET
add-in. This forces PowerPoint to save an undo point for that interaction so
it breaks up the calls to my add-in, but it's not really a production-quality
fix.

This has been driving me round the bend for a week or so now, so any help is
appreciated. I can post example code if needed.

Regards,

Mike
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top