|
-
Apr 11th, 2006, 12:18 PM
#1
Thread Starter
Lively Member
Sound and Video Counter for Power Point
Hello, how do I count sound and video file on powerpoint presentation thanks.
-
Apr 11th, 2006, 01:39 PM
#2
Re: Sound and Video Counter for Power Point
 Originally Posted by Kawser
Hello, how do I count sound and video file on powerpoint presentation thanks. 
Hi,
It will count the number of sound files and video file not gifs, pictures etc.
VB Code:
Sub MediaCounter()
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 = msoMedia Then
intCounter = intCounter + 1
End If
Next
Next
MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & intCounter & " Media object(s) in this presentation", vbQuestion
End Sub
-
Apr 11th, 2006, 01:50 PM
#3
Thread Starter
Lively Member
Re: Sound and Video Counter for Power Point
 Originally Posted by cssriraman
Hi,
It will count the number of sound files and video file not gifs, pictures etc.
VB Code:
Sub MediaCounter()
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 = msoMedia Then
intCounter = intCounter + 1
End If
Next
Next
MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & intCounter & " Media object(s) in this presentation", vbQuestion
End Sub
Hey thanks for your help, but that what I did at first it counts the shape of the sound and the video together, but what I want is it to count the sound and the video separately thanks. Sorry about that /|\
Last edited by Kawser; Apr 11th, 2006 at 01:53 PM.
-
Apr 12th, 2006, 01:42 PM
#4
Re: Sound and Video Counter for Power Point
Hi,
Here is the code:
VB Code:
Sub MediaCounter()
Dim oSlide As Slide
Dim oShape As Shape
Dim intVideoCounter As Integer
Dim intSoundCounter As Integer
For Each oSlide In ActivePresentation.Slides
For Each oShape In oSlide.Shapes
If oShape.Type = msoMedia Then
Select Case oShape.MediaType
Case ppMediaTypeMovie
intVideoCounter = intVideoCounter + 1
Case ppMediaTypeSound
intSoundCounter = intSoundCounter + 1
End Select
End If
Next
Next
MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
MsgBox "There are " & intVideoCounter & " Video object(s) in this presentation", vbQuestion
MsgBox "There are " & intSoundCounter & " sound object(s) in this presentation", vbQuestion
End Sub
-
Apr 12th, 2006, 01:43 PM
#5
Re: Sound and Video Counter for Power Point
When you have received an answer to your question, please mark it as resolved using the Thread Tools menu.
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
|