Slideshow does not refresh after adding content dynamically

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have PPT 2003 code that writes objects directly to the slide master that
render during run time. In office 2007, this behavior does not happen. The
object is placed on the slide master (also tried on a slide with same
results) but does not render during the presentation. I can not find a
refresh or repaint method.

I also update hyperlinks in shows automatically and this happens, but also
is not rendered on the slide show during presentation.

For both of these, exiting the show and then running the show gives the
appropriate behavior, but that is an unacceptable programming option.

Was something moved or is there a better way to do this in 2007? Anyone
know the answer to this? Thanks!
 
I have PPT 2003 code that writes objects directly to the slide master that
render during run time. In office 2007, this behavior does not happen. The
object is placed on the slide master (also tried on a slide with same
results) but does not render during the presentation. I can not find a
refresh or repaint method.

I also update hyperlinks in shows automatically and this happens, but also
is not rendered on the slide show during presentation.

For both of these, exiting the show and then running the show gives the
appropriate behavior, but that is an unacceptable programming option.

Was something moved or is there a better way to do this in 2007? Anyone
know the answer to this? Thanks!

This may not be the correct way but i did this way..replaced object
like this objcet left = left +.00005f
then left =left
 
Thanks for the info, but that did not work either. I am finding strange
results when working with the slide master. For example, if I save it during
run time, the new presentation doesn't have the data at all. However, if I
run it from the editor and then view it after, the master has all data, but
it is not shown on the final slide, until saving and then rerunning.

Any other ideas out there???
 
Have you tried going to the current slide with

ActivePresentation.SlideShowWindow.View.GotoSlide _
ActivePresentation.SlideShowWindow.View.Slide.SlideIndex


--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
David -

Thank you. After trying many different things, I found a new feature in
2007. On screen show format is now called on screen show (4:3) or (16:9) or
(16:10). When a show was not in the on screen show format in 2003, I
suppressed the infromation I was writing to the screen.

However, I still noted behavior that had things on the master show that were
not making it through. After updating my code to handle the new screen
formats, it works as i expected and i have not run into any new errors.
Hyperlinks are no longer a collection on a slide, they are imbedded in each
object (i am updating that part now).

Thank you for your suggestion.
 
Blake -

See my reply to David above.

I tried to force a window refresh with the UpdateWindow API which was fairly
simple. You might try that.

I found another logic error in my code that prevented the update, so that
threw me for quite a loop. Now that i have that figured out, it appears to
be working. I have a call back routine that updates status information
directly which also appears to be working now.

For the record, I am still not convinced that the paint routines in PPT are
working correctly, but it appears to be fine on my end right now.

I would suggest looking into your code for those little changes they made in
PowerPoint that may be a logic error giving you those undesired results.

Hope this helps you out. ....

Andy
 
Great. I'm glad you got it to work.
--David

--
David M. Marcovitz
Microsoft PowerPoint MVP
Director of Graduate Programs in Educational Technology
Loyola College in Maryland
Author of _Powerful PowerPoint for Educators_
http://www.PowerfulPowerPoint.com/
 
here's a little code snippet that will refresh your slide during slideshow:

Dim iSlideIndex As Integer

iSlideIndex = PPApp.SlideShowWindow
(1).View.CurrentShowPosition
PPApp.SlideShowWindows(1).View.GotoSlide(iSlideIndex)

EggHeadCafe.com - .NET Developer Portal of Choice
http://www.eggheadcafe.com
 
Blake - Thanks for that.

I can't use that solution or the one David suggested, because we handle an
update during the SlideShowNextSlide event and that gets me into circular
logic.

HOWEVER... here is what I found out. Although my logic error was in place,
it worked if I had run the slide before in the editor mode as it rerender's
the page, but if run directly from a show, it does not.

SOLUTION: There MUST be a bug in the redraw events internal to PowerPoint
2007 when writing to the master slide. If I draw something during run time
and show it on the master it will not get painted, although the objects are
there. We stumbled upon this fix: Adding an object to a slide forces the
redraw routine internal to PowerPoint 2007. So we add any object (a line),
make it invisible during each slide show next slide event. This forces a
redraw and we are able to get our code to work.

If anyone knows this is not a bug but a feature, please let me know.
 
David -

Although my logic error was in place, it worked if I had run the slide
before in the editor mode as it rerender's the page correctly. But if run
directly from a show, it does not show dynamic objects placed on the master
slide.

My conclusion is that there MUST be a bug in the redraw events internal to
PowerPoint 2007 when writing to the master slide. The solution we are using
is this: Adding an object to a slide forces the redraw routine internal to
PowerPoint 2007. So we add any object (a line), make it invisible during
each slide show next slide event. This forces a redraw and we are able to
get our code to work.

If this is not a bug but a feature, please let me know.

Thanks for your help and suggestions!
 
David -

Although my logic error was in place, it worked if I had run the slide
before in the editor mode as it rerender's the page correctly. But if run
directly from a show, it does not show dynamic objects placed on the master
slide.

My conclusion is that there MUST be a bug in the redraw events internal to
PowerPoint 2007 when writing to the master slide. The solution we are using
is this: Adding an object to a slide forces the redraw routine internal to
PowerPoint 2007. So we add any object (a line), make it invisible during
each slide show next slide event. This forces a redraw and we are able to
get our code to work.

If this is not a bug but a feature, please let me know.

Thanks for your help and suggestions!

I can't belive as replace is not working ,because i am drawing shapes
and line on matser slide,i faced re -draw issue,but
i simply did shape.left = shape.left+0.0000001f
then it has re-drawn properly..still working fine..i didn't check with
other object..but line and shape it should work..
 
Thanks for the heads up there. I tried that approach before, but that was
when i had my other bug (mentioned earlier). This may be a better solution.

The slideshowsettings.view.gotoslide does not work for me either - although
it does in other tests, just not the app i've created. Odd behavior.

I will give the shape.left solution another go. Thanks!

Andy
 
Andy,

Could you share your PPT 2003 code with me?

I am attempting to display a textbox on every slide that will display a number from an excel file. The ppt presentation will be running continuously throughout a ceremony and I want to be able to update the textbox on the presentation through excel w/o interrupting the presentation.

Using slide master is an interesting idea, however, I'm a beginner when it comes to vba or advanced ppt.

If you could help me, it would be greatly appreciated.

Thanks.
 
Back
Top