Microsoft Office Forums

Go Back   Microsoft Office Forums > >

Reply
 
Thread Tools Display Modes
  #1  
Old 08-16-2012, 01:36 AM
panel panel is offline Image page numbering macro Windows 7 64bit Image page numbering macro Office 2010 64bit
Novice
Image page numbering macro
 
Join Date: Aug 2012
Posts: 1
panel is on a distinguished road
Default Image page numbering macro

Hello



I wonder if it's possible to create marco to create visual representation of presentation progress (page numbers).
Please see attach - yellow triangles means total num of pages, black triangle means current page.

Obviously I could do all the work manually, but each time I inserd new page into presentation I'll would have to update all pages.
So summing up I'll need a macro witch:
- will add such "page numbering images" to all slides
- before adding those images will remove all "page numbering images" (if any exist)

I am not a visual basic programmer, so the best help for me would be to get a link to similar solution or existing macro.
Attached Images
File Type: jpg prezentacja-PP.jpg (2.5 KB, 12 views)
Reply With Quote
  #2  
Old 08-16-2012, 06:33 AM
JohnWilson JohnWilson is offline Image page numbering macro Windows 7 64bit Image page numbering macro 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

This doesn't create an image but it should get you close

Code:
Sub picNums()
Dim osld As Slide
Dim lngCount As Long
Dim L As Long
Dim sH As Long
lngCount = ActivePresentation.Slides.Count
sH = ActivePresentation.PageSetup.SlideHeight
Call zapper
For Each osld In ActivePresentation.Slides
osld.HeadersFooters.SlideNumber.Visible = True
If Not getNum(osld) Is Nothing Then
With getNum(osld).TextFrame.TextRange.Font
.Size = 16
.Color.RGB = vbBlack
.Bold = True
End With
End If
    With osld.Shapes
        For L = 1 To lngCount
        With .AddShape(msoShapeIsoscelesTriangle, L * 15, sH - 12, 12, 12)
            .Name = "PicNum" & CStr(L)
            If osld.SlideIndex <> L Then
            .Fill.ForeColor.RGB = vbYellow
            .Line.Visible = False
            Else
            .Fill.ForeColor.RGB = vbBlack
            .Line.Visible = False
            End If
        End With
        Next L
    End With
Next osld
End Sub

Sub zapper()
Dim osld As Slide
Dim i As Integer
For Each osld In ActivePresentation.Slides
For i = osld.Shapes.Count To 1 Step -1
If osld.Shapes(i).Name Like "PicNum*" Then osld.Shapes(i).Delete
Next i
Next osld
End Sub
Function getNum(osld As Slide) As Shape
Dim oshp As Shape
For Each oshp In osld.Shapes
If oshp.Type = msoPlaceholder Then
If oshp.PlaceholderFormat.Type = ppPlaceholderSlideNumber Then
Set getNum = oshp
Exit Function
End If
End If
Next oshp
End Function
__________________
Microsoft PowerPoint MVP 2007-2023
Free Advanced PowerPoint Tips and Tutorials
Reply With Quote
Reply

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Starting page numbering on page 3?? milesmcgoo Word 3 02-15-2014 03:28 PM
Page Header and Page Numbering for Technical Book SQLUSA Word 4 06-25-2012 09:53 AM
Image page numbering macro Page numbering with Section 1.1 Page 1 sunalta Word 1 05-31-2012 02:48 PM
Image page numbering macro Page Numbering romyess Word 1 05-14-2012 09:19 AM
Image page numbering macro Stretch image to fullpage macro yAnn1ck Word VBA 1 04-08-2012 10:28 PM

Other Forums: Access Forums

All times are GMT -7. The time now is 01:55 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