|
-
Apr 7th, 2006, 02:13 PM
#1
Thread Starter
Lively Member
Power Point Macro (WordArt)
Hello, this code was suppose to count WordArt only but it also counts picture how do I just do WordArt count not picture and picture count by itself thanks.
Sub Counter()
Dim WordArt As Integer
Dim Counter As Integer
Dim Slide As Integer
Counter = 0
With PowerPoint.ActivePresentation
For Slide = 1 To .Slides.Count
For WordArt = 1 To .Slides(Slide).Shapes.Count
If .Slides(Slide).Shapes(WordArt).AutoShapeType = -2 Then
Counter = Counter + 1
End If
Next WordArt
Next Slide
End With
MsgBox "There are " & Slide - 1 & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & Counter & " Wordart(s) in this presentation", vbQuestion
Save.Show
End Sub
-
Apr 8th, 2006, 06:44 PM
#2
Thread Starter
Lively Member
Re: Power Point Macro (WordArt)
-
Apr 8th, 2006, 09:13 PM
#3
Re: Power Point Macro (WordArt)
Welcome to Forums!
Please use [vbcode] your code goes in here [/vbcode] tags when posting code.
Here is the code to count number of word arts in a powerpoint file:
VB Code:
Sub WordArtCounter()
Dim oSlide As Slide
Dim oShape As Shape
Dim intCounter As Integer
intCounter = 0
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
If oShape.Type = msoTextEffect Then
intCounter = intCounter + 1
End If
Next
Next
MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & intCounter & " Wordart(s) in this presentation", vbQuestion
End Sub
Hope this helps!
-
Apr 10th, 2006, 11:27 AM
#4
Thread Starter
Lively Member
Re: Power Point Macro (WordArt)
 Originally Posted by cssriraman
Welcome to Forums!
Please use [vbcode] your code goes in here [/vbcode] tags when posting code.
Here is the code to count number of word arts in a powerpoint file:
VB Code:
Sub WordArtCounter()
Dim oSlide As Slide
Dim oShape As Shape
Dim intCounter As Integer
intCounter = 0
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
If oShape.Type = msoTextEffect Then
intCounter = intCounter + 1
End If
Next
Next
MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & intCounter & " Wordart(s) in this presentation", vbQuestion
End Sub
Hope this helps!
It worked great thanks a lot man.
-
Apr 10th, 2006, 12:30 PM
#5
Re: Power Point Macro (WordArt)
You are Welcome!
Please use [vbcode] your code goes in here [/vbcode] tags when posting code.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|