VBA - How to count masters in v2003?

M

Mel

I thought it'd be easy, but I can't find an object to get a count off
of or to loop for a count. I'm just trying to count the masters in the
active presentation. (Every TitleMaster + every SlideMaster) I need
the count of all the actual masters as seen in the masters view.

Thanks,
Melina
 
M

Mel

Once more, you're my hero! <g>

Here's what I made to count them all together...

Sub CountTheMasters()
Dim x As Long
Dim iMasterCount As Long
With ActivePresentation
For x = 1 To .Designs.Count
iMasterCount = iMasterCount + 1
If .Designs(x).HasTitleMaster Then
iMasterCount = iMasterCount + 1
End If
Next
End With
MsgBox "This presentation has " & iMasterCount & " masters."
End Sub

Thanks Steve.
-Melina
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top