Reputation: 2105
Background
I have a countdown timer created with 2 shapes in a custom layout slide in Master layout. The first one, pieShape
, is created using the Powerpoint's Pie shape and the second one, ovalShape
, is created using the Oval shape.
I have a piece of code in my VSTO C# add-in that regularly updates the pieShape.Adjustments[2]
property and ovalShape.TextFrame2.TextFrange.Text
property every 1 second using a System.Windows.Forms.Timer
class. Changes in ovalShape.TextFrame2.TextFrange.Text
should cause a number to change
Problem
The changes in ovalShape.TextFrame2.TextFrange.Text
is not reflected in slideshow view e.g., only pieShape
is updated, not ovalShape
. However, it is reflected outside of slideshow view.
How the timer behaves when viewing in SlideShow view. (Only pieShape
is updated)
How the timer behaves when viewing outside of SlideShow. (Correct behaviour)
Why doesn't Powerpoint's Slide Show view show the latest changes made on a shape's text property whereby the shape is created on a layout in Master layout?
Other notes
If I put ovalShape
and pieShape
onto the slide itself (not in
any Custom Layout), this problem does not happen.
Code to update ovalShape.TextFrame2.TextFrange.Text
//atimer extends System.Windows.Forms.Timer
//it has a property called ticking that stores the current second
ovalShape.TextFrame2.TextRange.Text = atimer.ticking.ToString();
Upvotes: 0
Views: 122
Reputation: 14809
PowerPoint is unreliable about refreshing the SlideShow view when you make changes to slides/masters during a presentation.
Sometimes it's enough to do a .View.GoToSlide(x) where x is the SlideIndex of the current slide.
When that doesn't work, it can help to add a shape on or off slide then delete it. It might also help to do the gotoslide trick after adding the shape and again after deleting it.
Upvotes: 0