-
2008-12-02
导出嵌入的声音文件(*.WAV) - [VBA代码分享]
版权声明:转载时请以超链接形式标明文章原始出处和作者信息及本声明
http://pptaddins.blogbus.com/logs/32046474.html
下面的代码用于提取嵌入到PPT中的声音并把它保存为 一个文件,SoundFormat对象在PPT对象模型中属于隐藏对象。
- Sub ExtractWavFile()
- Dim oShp As Shape
- Set oShp = ActiveWindow.Selection.ShapeRange.Item(1)
- With oShp
- If .Type = msoMedia Then
- If .MediaType = ppMediaTypeSound Then
- If Dir(.SoundFormat.SourceFullName) <> "" Then
- If MsgBox("Overwrite the original file?", _
- vbQuestion + vbYesNo, "File already exists") = vbYes Then
- .SoundFormat.Export .SoundFormat.SourceFullName
- End If
- End If
- End If
- End If
- End With
- End Sub
随机文章:
学习写作一个PPT插件(入门级) 2009-10-25用代码在放映时画图 2009-07-28判断动画归属类别 2008-12-02设置和获取幻灯片的大小 2009-10-25PowerPoint动画库扩展2.0版预览 2009-03-20








评论
对VBA还一点不懂。不知道博主的代码怎么用。