![]() |
|
#1
|
|||
|
|||
|
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. |
|
#2
|
|||
|
|||
|
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
|
|
|
|
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 |
Page numbering with Section 1.1 Page 1
|
sunalta | Word | 1 | 05-31-2012 02:48 PM |
Page Numbering
|
romyess | Word | 1 | 05-14-2012 09:19 AM |
Stretch image to fullpage macro
|
yAnn1ck | Word VBA | 1 | 04-08-2012 10:28 PM |