Microsoft Office Forums

Go Back   Microsoft Office Forums > >

 
 
Thread Tools Display Modes
Prev Previous Post   Next Post Next
  #2  
Old 06-08-2014, 09:56 AM
JohnWilson JohnWilson is offline PowerPoint Macro - Copy and Replace pictures from one PPT to another PPT Windows 7 64bit PowerPoint Macro - Copy and Replace pictures from one PPT to another PPT Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,914
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

If you used Photo Album EDIT Just read your other post - If there is OTHER content this will not work!

Just go back to INSERT Photo Album. Choose EDIT and seelct the first and shift select the last image > DELETE. Then add the new images. Should take less than a minute.

Difficult to write a macro without seeing the files.

If the two presentations have the same number of slides and images this MIGHT work. Use a copy in case it gores wrong and change the names of the files in the code to match the names you have.

Sub switchPic()
Dim oTarget As Presentation
Dim oSource As Presentation
Dim i As Integer
Dim oshp As Shape
'NOTE use the names of your own presentations
Set oTarget = Presentations("Image1.pptx")
Set oSource = Presentations("Image2.pptx")
For i = 1 To oSource.Slides.Count
If oSource.Slides(i).Shapes(1).Type = msoPicture Then
oSource.Slides(i).Shapes(1).Copy
End If
If oTarget.Slides(i).Shapes(1).Type = msoPicture Then
oTarget.Slides(i).Shapes(1).Delete
oTarget.Windows(1).Activate
ActiveWindow.View.GotoSlide i
oTarget.Slides(i).Shapes.Paste
End If
Next i
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials

Last edited by JohnWilson; 06-08-2014 at 12:45 PM.
Reply With Quote
 



Similar Threads
Thread Thread Starter Forum Replies Last Post
How can I use a Macro to automatically update all the pictures in a word doc GezLundy Word VBA 3 06-12-2014 03:23 AM
VBA for pictures positioning in powerpoint iebogu PowerPoint 1 01-17-2014 05:47 AM
Copy picture style to all pictures in a presentation Gary Drumm PowerPoint 2 04-18-2013 10:36 AM
Colour mismatch inserting pictures into Powerpoint 2010 Osprey PowerPoint 0 10-25-2012 08:44 AM
Search Replace Copy dblack7211 Word 0 05-05-2010 01:19 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 03:22 PM.


Powered by vBulletin® Version 3.8.11
Copyright ©2000 - 2025, vBulletin Solutions Inc.
Search Engine Optimisation provided by DragonByte SEO (Lite) - vBulletin Mods & Addons Copyright © 2025 DragonByte Technologies Ltd.
MSOfficeForums.com is not affiliated with Microsoft