Results 1 to 5 of 5

Thread: Sound and Video Counter for Power Point

  1. #1

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    109

    Question Sound and Video Counter for Power Point

    Hello, how do I count sound and video file on powerpoint presentation thanks.

  2. #2
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Sound and Video Counter for Power Point

    Quote 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:
    1. Sub MediaCounter()
    2.     Dim oSlide As Slide
    3.     Dim oShape As Shape
    4.     Dim intCounter As Integer
    5.     intCounter = 0
    6.     For Each oSlide In ActivePresentation.Slides
    7.         For Each oShape In oSlide.Shapes
    8.             If oShape.Type = msoMedia Then
    9.                 intCounter = intCounter + 1
    10.             End If
    11.         Next
    12.     Next
    13.     MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
    14.     MsgBox "There are " & intCounter & " Media object(s) in this presentation", vbQuestion
    15. End Sub
    CS

  3. #3

    Thread Starter
    Lively Member
    Join Date
    Apr 2006
    Posts
    109

    Wink Re: Sound and Video Counter for Power Point

    Quote Originally Posted by cssriraman
    Hi,

    It will count the number of sound files and video file not gifs, pictures etc.
    VB Code:
    1. Sub MediaCounter()
    2.     Dim oSlide As Slide
    3.     Dim oShape As Shape
    4.     Dim intCounter As Integer
    5.     intCounter = 0
    6.     For Each oSlide In ActivePresentation.Slides
    7.         For Each oShape In oSlide.Shapes
    8.             If oShape.Type = msoMedia Then
    9.                 intCounter = intCounter + 1
    10.             End If
    11.         Next
    12.     Next
    13.     MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
    14.     MsgBox "There are " & intCounter & " Media object(s) in this presentation", vbQuestion
    15. 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.

  4. #4
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    Re: Sound and Video Counter for Power Point

    Hi,

    Here is the code:
    VB Code:
    1. Sub MediaCounter()
    2.     Dim oSlide As Slide
    3.     Dim oShape As Shape
    4.     Dim intVideoCounter As Integer
    5.     Dim intSoundCounter As Integer
    6.     For Each oSlide In ActivePresentation.Slides
    7.         For Each oShape In oSlide.Shapes
    8.             If oShape.Type = msoMedia Then
    9.                 Select Case oShape.MediaType
    10.                 Case ppMediaTypeMovie
    11.                     intVideoCounter = intVideoCounter + 1
    12.                 Case ppMediaTypeSound
    13.                     intSoundCounter = intSoundCounter + 1
    14.                 End Select
    15.             End If
    16.         Next
    17.     Next
    18.     MsgBox "There are " & ActivePresentation.Slides.Count & " Slide(s) in this presentation", vbQuestion
    19.     MsgBox "There are " & intVideoCounter & " Video object(s) in this presentation", vbQuestion
    20.     MsgBox "There are " & intSoundCounter & " sound object(s) in this presentation", vbQuestion
    21. End Sub
    CS

  5. #5
    Frenzied Member cssriraman's Avatar
    Join Date
    Jun 2005
    Posts
    1,465

    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.
    CS

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width