I have a VBA script written that searches through one PowerPoint (PRS_data) for a title match, and then copies the slide to a new PowerPoint (PRS). The slides on the source are simply a title and an image. When some of the slides are copied over, the images are either not carried over or I get a box with a red X.
I am using PowerPoint 2007 SP3, so that red X hotfix isn't the problem.
I also tried adding DoEvents and a Sleep as well, with no success.
If I leave the destination window maximized on the user's screen it seems to work, but if it is minimized, I get sporadic blank slides. The results are inconsistent. Also, I can confirm the slides do get copied, because the destination is an empty presentation and it is filled with slides that just have the correct titles on them. Again inconsistent results though.
Anyone ran into this before??
Here is the code:
For Each Sld In PRS_data.Slides
If Sld.SlideIndex > 1 Then
If (Sld.Shapes.Title.TextFrame.TextRange.Text Like "*" & iDiv & " Division*") Then
PRS_data.Slides.Range(Sld.SlideIndex).Cut
PRS.Windows(1).Activate
PRS.Slides.Paste
DoEvents
End If
End If
Next
if
statements work fine?? – Kazimierz Jaworif's
statements does your code copy all slides as expected or not?? – Kazimierz Jaworif
statements aren't the problem because the slides are being copied over to the destination, because the titles are showing up on blank slides on the destination. It's just the images don't come over on some slides. – Eric Alan Hill