Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 10-20-2011, 11:42 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 recording macro in ppt 2007

I have 2007, in 2003 I could record a macro, but in 2007 ppt I cannot seem to find the control to record a macro?

The below macro worked in 2003, but does not work in 2007, its a simple fit to page function:



ActiveWindow.Selection.ShapeRange.ScaleWidth 1, msoFalse, msoScaleFromBottomRight
ActiveWindow.Selection.ShapeRange.ScaleHeight 1, msoFalse, msoScaleFromBottomRight
ActiveWindow.Selection.ShapeRange.ScaleWidth 1, msoFalse, msoScaleFromTopLeft
ActiveWindow.Selection.ShapeRange.ScaleHeight 1, msoFalse, msoScaleFromTopLeft
End Sub
Reply With Quote
  #2  
Old 10-21-2011, 03:41 AM
PetLahev PetLahev is offline recording macro in ppt 2007 Windows XP recording macro in ppt 2007 Office 2007
Novice
 
Join Date: Oct 2011
Posts: 7
PetLahev is on a distinguished road
Default

In PPT 2007 you can't record macro :-(

What about this code
Code:
Dim shp As ShapeRange
    If ActiveWindow.Selection.Type = ppSelectionShapes Then
        Set shp = ActiveWindow.Selection.ShapeRange
        shp.Left = 0
        shp.Top = 0
        shp.Height = ActivePresentation.PageSetup.SlideHeight
        shp.Width = ActivePresentation.PageSetup.SlideWidth
    End If
    Set shp = Nothing
Reply With Quote
  #3  
Old 12-06-2011, 07:39 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 Doesn/t work

I get a comile error and it highlights the word activewindow in the macro
Reply With Quote
  #4  
Old 12-06-2011, 08:04 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

I have office 2007 Powerpoint now and I cannot figure out a macro to fit a screen shot to an outline on the PPT I have created, it must fit within this outline, each ppt file is 7 pages and I have 300 files to create, I used to record a macro, but Microsoft decided to omit the record macro from office 2007, way to go Billy!, we are going backwards now???? Anyway ok I feel better, ok no I dont, is there anyone that can write my macro I recorded in 2003 for 2007???

Is this the best sight to ask questions like this, if anyone knows the best place let me know, have no idea?
Reply With Quote
  #5  
Old 12-06-2011, 12:35 PM
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 A real helpful forum for Powerpoint

Does anyone know of a real Powerpoint site where there is actually someone assisting users for the Pathetic PPT 2007 version????
Reply With Quote
  #6  
Old 12-09-2011, 11:45 PM
Alchemy Alchemy is offline recording macro in ppt 2007 Windows 7 64bit recording macro in ppt 2007 Office 2010 32bit
Novice
 
Join Date: Dec 2011
Posts: 1
Alchemy is on a distinguished road
Default

Does this work??

Dim oshp As Shape
Dim osld As Slide
Set osld = ActiveWindow.View.Slide
Set oshp = osld.Shapes(osld.Shapes.Count)
oshp.Left = 0
oshp.Top = 0
oshp.Height = ActivePresentation.PageSetup.SlideHeight
oshp.Width = ActivePresentation.PageSetup.SlideWidth
Set oshp = Nothing
Set osld = Nothing
Reply With Quote
  #7  
Old 12-13-2011, 12:41 PM
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

This fits to the entire ppt page, I have an outline on the ppt page that I need it to fit, I have attached the ppt file with the page outline.

Can you make the code have it fit within the outline?

Also in 2003 my code fit to all pages in the file as all slides were the same, the code you provided requires residing on each page... can you make it fit all pages in the ppt file when open?
Attached Files
File Type: ppt TEST OUTLINE FIT PAGE.ppt (98.0 KB, 11 views)
Reply With Quote
  #8  
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,912
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
  #9  
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:51 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