Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 12-14-2011, 12:59 AM
JohnWilson JohnWilson is offline recording macro in ppt 2007 Windows 7 64bit recording macro in ppt 2007 Office 2010 32bit
Programmer
 
Join Date: Nov 2008
Location: UK
Posts: 1,913
JohnWilson has a spectacular aura aboutJohnWilson has a spectacular aura about
Default


See if this gets you closer:

Code:
Sub FittopageCurrent()
'Fits the last added shape to the box on the master
'on current slide
Dim oshp As Shape
Dim osld As Slide
Dim otarget As Shape
Set otarget = ActivePresentation.SlideMaster.Shapes("Rectangle 8")
Set osld = ActiveWindow.View.Slide
Set oshp = osld.Shapes(osld.Shapes.Count)
oshp.Left = otarget.Left
oshp.Top = otarget.Top
oshp.LockAspectRatio = False
oshp.Height = otarget.Height
oshp.Width = otarget.Width
Set oshp = Nothing
Set osld = Nothing
End Sub

Sub FittopageAll()
'Fits the last added shape to the box on the master
'on all slides
Dim oshp As Shape
Dim osld As Slide
Dim otarget As Shape
Set otarget = ActivePresentation.SlideMaster.Shapes("Rectangle 8")
For Each osld In ActivePresentation.Slides
If osld.Shapes.Count > 0 Then
Set oshp = osld.Shapes(osld.Shapes.Count)
oshp.Left = otarget.Left
oshp.Top = otarget.Top
oshp.LockAspectRatio = False
oshp.Height = otarget.Height
oshp.Width = otarget.Width
End If
Next osld
Set oshp = Nothing
Set osld = Nothing
End Sub
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
  #2  
Old 12-14-2011, 07:46 AM
rwab rwab is offline recording macro in ppt 2007 Windows XP recording macro in ppt 2007 Office 2003
Novice
recording macro in ppt 2007
 
Join Date: May 2009
Posts: 8
rwab is on a distinguished road
Default

Perfection, thanks much.....
Reply With Quote
Reply



Similar Threads
Thread Thread Starter Forum Replies Last Post
VBA: Recording a macro to insert a PIVOT table e093223 Excel Programming 0 10-09-2011 01:55 AM
Recording Macro Tutorials JesseAitchison Word VBA 0 07-24-2011 05:36 PM
Recording Macros Tutorial? Madhouse Word VBA 1 04-28-2010 01:32 PM
Tutorial recording macros Jaffa Word VBA 0 04-27-2010 09:14 PM
Sound Recording stilts77 PowerPoint 0 03-13-2010 03:25 AM

Other Forums: Access Forums

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


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