|
||
---|---|---|
PowerPoint tips, hints and tutorials that will change your presentations for ever! | ||
Jigsaws |
Hate The PowerPoint 2007 / 2010 Slide Numbers?? If you really don't like the new style numbers and footers that can be edited on each slide and want the old style "fixed" numbers back then look no further. All you need to do is replace the placeholders on the master and all of the layouits with real text boxes. Insert the slide number and date objects and format to match the old ones. You can do this instantly with the code below. If you do not want the date or number showing simply delete it on the Master slide *the big one). Don't forget to alter or delete the text in the footer. DON'T TRY TO RUN THIS IN EARLIER VERSIONS! Sub fixSN() Dim oDes As Design Dim oCust As CustomLayout Dim L As Long Dim objSN As Shape Dim oshp As Shape Dim objFooter As Shape Dim objDate As Shape For Each oDes In ActivePresentation.Designs With oDes.SlideMaster 'get date,footer and Slide Number shapes For L = 1 To .Shapes.Count Set oshp = .Shapes(L) With oshp If .Type = msoPlaceholder Then If .PlaceholderFormat.Type = ppPlaceholderSlideNumber Then _ Set objSN = oshp If .PlaceholderFormat.Type = ppPlaceholderDate Then _ Set objDate = oshp If .PlaceholderFormat.Type = ppPlaceholderFooter Then _ Set objFooter = oshp End If End With Next L If Not objSN Is Nothing Then With .Shapes.AddTextbox _ (msoTextOrientationHorizontal, objSN.Left, objSN.Top, objSN.Width, objSN.Height) With .TextFrame.TextRange .InsertSlideNumber .Font.Name = objSN.TextFrame.TextRange.Font.Name .Font.Size = objSN.TextFrame.TextRange.Font.Size .Font.Color = objSN.TextFrame.TextRange.Font.Color .ParagraphFormat.Alignment = _ objSN.TextFrame.TextRange.ParagraphFormat.Alignment End With End With objSN.Delete End If If Not objDate Is Nothing Then With .Shapes.AddTextbox _ (msoTextOrientationHorizontal, objDate.Left, objDate.Top, objDate.Width, objDate.Height) With .TextFrame.TextRange .InsertDateTime (ppDateTimeFigureOut) .Font.Name = objDate.TextFrame.TextRange.Font.Name .Font.Size = objDate.TextFrame.TextRange.Font.Size .Font.Color = objDate.TextFrame.TextRange.Font.Color .ParagraphFormat.Alignment = _ objDate.TextFrame.TextRange.ParagraphFormat.Alignment End With End With objDate.Delete End If If Not objFooter Is Nothing Then With .Shapes.AddTextbox _ (msoTextOrientationHorizontal, objFooter.Left, objFooter.Top, objFooter.Width, objFooter.Height) With .TextFrame.TextRange .Text = "Footer" .Font.Name = objFooter.TextFrame.TextRange.Font.Name .Font.Size = objFooter.TextFrame.TextRange.Font.Size .Font.Color = objFooter.TextFrame.TextRange.Font.Color .ParagraphFormat.Alignment = _ objFooter.TextFrame.TextRange.ParagraphFormat.Alignment End With End With objFooter.Delete End If Set objSN = Nothing Set objFooter = Nothing Set objDate = Nothing End With 'deletes real placeholder from all layouts For Each oCust In oDes.SlideMaster.CustomLayouts With oCust For L = 1 To .Shapes.Count Set oshp = .Shapes(L) With oshp If .Type = msoPlaceholder Then If .PlaceholderFormat.Type = ppPlaceholderSlideNumber Then _ Set objSN = oshp If .PlaceholderFormat.Type = ppPlaceholderDate Then _ Set objDate = oshp If .PlaceholderFormat.Type = ppPlaceholderFooter Then _ Set objFooter = oshp End If End With Next L If Not objDate Is Nothing Then objDate.Delete If Not objFooter Is Nothing Then objFooter.Delete If Not objSN Is Nothing Then objSN.Delete End With Next oCust Next oDes End Sub Don't know how to use this code? |
|
Articles on your favourite sport Free Microsoft PowerPoint Advice, help and tutorials, Template Links |