Header
PowerPoint tips, hints and tutorials that will change your presentations for ever!

INDEX

 

Jigsaws
Sounds
Video
Custom Shows
vba code
NaviSlides
Games for teachers
Bullets
Triggers
Security
Flash Cards
Multiple Instances
PowerPoint 2007
Mail Merge
Random events
Animation
Hyperlinks
Set spellcheck language


Home buttonTutorial buttonContact buttonProducts button

Slides.InsertFromFile Bug in PowerPoint 2013

You can use the InsertFromFile method to insert slides from a file into your current presentation.

This code should insert all slides from the "elephants2.pptx" file into my open presentation.

Sub opt1()
Dim lngTot As Long
lngTot = ActivePresentation.Slides.Count
ActivePresentation.Slides.InsertFromFile "C:\Users\John\Desktop\elephants2.pptx", lngTot
End Sub

Works fine in 2010 version but it does not in 2013. Inserted slides with images are likely to display a red cross and an error (Image cannot be displayed)

 

NOTE Fixed in Update http://support.microsoft.com/KB/2910907

Workaround

Instead of InsertFrom File open the donor presentation silently (no window) copy the slides, close again and then paste the slides into you current presentation.


Sub opt2()
Dim lngTot As Long
Dim oSource As Presentation
Dim oTarget As Presentation
Set oTarget = ActivePresentation
lngTot = oTarget.Slides.Count
Set oSource = Presentations.Open("C:\Users\John\Desktop\elephants2.pptx", withWindow:=False)
oSource.Slides.Range.Copy
oSource.Close
oTarget.Slides.Paste , lngTot
End Sub

 

 

Back to the Index Page

POWERPOINT BLOG

Articles on your favourite sport

Free Microsoft PowerPoint Advice, help and tutorials, Template Links
This website is sponsored by Technology Trish Ltd
© Technology Trish 2007
Registered in England and Wales No.5780175
PowerPoint® is a registered trademark of the Microsoft Corporation