none
Word 2010's UndoRecord does not undo AlternativeText property of an InlineShape object RRS feed

  • Question

  • Our custom application uses Word Interop to manipulate the properties of InlineShape objects. When upgraded to Word 2010, we took advantages of new features in Word 2010 such as UndoRecord object. We found that if we start an Undo transaction (using UndoRecord.StartCustomRecord("my change")), then our custom code manipulates an InlineShape object's property of AlternativeText, and then we end the transaction by calling UndoRecord.EndCustomRecord(). When the user clicks Undo or Ctrl-Z, the AlternativeText of the InlineShape object is not restored to its previous value (still keeps the modified value).

    However if you manipulates the AlternativeText property of an InlineShape via Word UI, and when you undo the change, Word just restores to the last typed character.

    • Moved by Cindy Meister MVPModerator Tuesday, May 10, 2011 4:27 PM Word object model specific (From:Visual Studio Tools for Office)
    Monday, May 9, 2011 6:51 PM

Answers

  • Hi JH2006,

    It doesn't look like due to UndoRecord object, as in my test even a separate VB command (not within UndoRecord.StartCustomRecord and UndoRecord.EndCustomRecord calls) to change AlternateText of InlineShape (or Shape) object doesn't get Undo when Ctrl+Z is pressed.

    Regards,

    Manvir Singh
    http://www.manvirsingh.net/

     

     

    • Marked as answer by Bruce Song Monday, May 16, 2011 7:52 AM
    Tuesday, May 10, 2011 6:03 AM

All replies

  • Hi JH2006,

    It doesn't look like due to UndoRecord object, as in my test even a separate VB command (not within UndoRecord.StartCustomRecord and UndoRecord.EndCustomRecord calls) to change AlternateText of InlineShape (or Shape) object doesn't get Undo when Ctrl+Z is pressed.

    Regards,

    Manvir Singh
    http://www.manvirsingh.net/

     

     

    • Marked as answer by Bruce Song Monday, May 16, 2011 7:52 AM
    Tuesday, May 10, 2011 6:03 AM
  • Hi JH2006,

    Have you figured out your problem yet, and does the suggestion help you? If you still have any concern on the thread, feel free to follow up.

    Best Regards,




    Bruce Song [MSFT]
    MSDN Community Support | Feedback to us
    Get or Request Code Sample from Microsoft
    Please remember to mark the replies as answers if they help and unmark them if they provide no help.

    Friday, May 13, 2011 8:20 AM