COM Automation with PowerPoint and Media Object filename

N

NickP

Hi there,

I am trying to get the filename of a media object within a slide in a
powerpoint presentation, code I have so far is...

With pPPPPresentation
Dim pIntCurSlide As Integer
For pIntCurSlide = 1 To .Slides.Count
Dim pObjSlide As Object = .Slides(pIntCurSlide)
Dim pIntCurShape As Integer
For pIntCurShape = 1 To pObjSlide.Shapes.Count
Dim pObjShape As Object = pObjSlide.Shapes(pIntCurShape)
If (pObjShape.Type = msoMedia) Then

<need to get the filename of the media object here!>

End If
Next
Next
Call .Close()
End With

Any ideas where this property is hidden? I am not referring to OLE
Linked objects either, this are media objects that are inserted via the
"Insert > Movie from file..." option in powerpoint.

Nick.
 
N

NickP

Try
Dim pStrFileName As String = pObjShape.LinkFormat.SourceFullName
MessageBox.Show(pStrFileName)
Catch ex As Exception
MessageBox.Show(ex.ToString)
End Try

for anyone elses benefit, I just tried the above block of code and it seems
to work. It would be nice to be able to obtain the voice recording data and
save that to a file, but I have no idea how yet...

Nick.
 

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