Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 02-10-2015, 10:21 PM
djlee djlee is offline Need macro to copy object on slide 4 to current slide Windows 8 Need macro to copy object on slide 4 to current slide Office 2010 64bit
Novice
Need macro to copy object on slide 4 to current slide
 
Join Date: Jan 2015
Posts: 19
djlee is on a distinguished road
Default Need macro to copy object on slide 4 to current slide

I have a collection of frequently used shapes on slide 4 of my presentation. I find myself copying and pasting shapes from that slide to other slides frequently. I need a macro to go to slide 4 and copy a specified shape to the current slide.



Is it possible to copy a specific shape from slide 4 to the current slide?

DJ

P.S. In Excel, I could name the shape, but I don't see how to do that in PowerPoint. So do I need to put the shapes I want to copy on separate slides or can I have multiple shapes on the slide even though I only want to copy a one?
Reply With Quote
  #2  
Old 02-11-2015, 12:34 AM
JohnWilson JohnWilson is offline Need macro to copy object on slide 4 to current slide Windows 7 64bit Need macro to copy object on slide 4 to current slide Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,912
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default

You can name the shapes by opening the selection pane (Home Tab>Select menu) and just select and change the name e.g. to "target"

Then this should work

Code:
Sub copyIt()
Dim oshp As Shape
Dim osld As Slide
On Error Resume Next
Err.Clear
Set osld = ActivePresentation.Slides(4)
Set oshp = osld.Shapes("target")
If Not oshp Is Nothing Then
oshp.Copy
Set osld = ActiveWindow.Selection.SlideRange(1)
If Not osld Is Nothing Then osld.Shapes.Paste
End If
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #3  
Old 02-11-2015, 10:37 AM
djlee djlee is offline Need macro to copy object on slide 4 to current slide Windows 8 Need macro to copy object on slide 4 to current slide Office 2010 64bit
Novice
Need macro to copy object on slide 4 to current slide
 
Join Date: Jan 2015
Posts: 19
djlee is on a distinguished road
Default

Thank you so much. Works perfectly.

DJ
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Need macro to copy object on slide 4 to current slide How can I reload the same slide from the current slide Jasonwagner2012@knights PowerPoint 4 01-13-2015 07:06 AM
Need macro to copy object on slide 4 to current slide Click an object on a slide, show another object on the same slide. meppley7 PowerPoint 2 04-28-2014 01:44 PM
Save Current Slide as Picture excelledsoftware PowerPoint 2 01-18-2012 02:42 PM
Need macro to copy object on slide 4 to current slide slide image wont copy with text to new slide lewis.mulhollen PowerPoint 1 12-17-2011 03:17 AM
Maintaining a shrunken object from slide to slide Straitsfan PowerPoint 0 05-18-2011 01:04 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:01 AM.


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