如何确定 PowerPoint 2010 中的音频文件路径和可用性

发布于 2024-09-30 13:37:34 字数 181 浏览 0 评论 0原文

我正在复制较小的日期更改,另一个用户创建的幻灯片,该用户经常忘记嵌入音频,而是链接它。

是否有一些简单的方法来确定音频是嵌入还是链接,以及源文件路径是什么(如果链接)?如果我可以运行一个宏来确定这一点,那将会有很大帮助。

不知道如何解决这个问题,但单独打开数十个文件来确定音频是否存在会击败本例中编写的所有其他脚本。

I am duplicating with minor date changes, slideshows created by another user, who constantly forgets to embed audio, but links it instead.

Is there some simple way to determine whether audio is embedded or linked, and what the source file path is, if it is linked? If I could run a macro to just determine this it would help enormously.

Not sure how to approach this, but individually opening dozens of files to determine audio is there defeats everything else that is scripted in this case.

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。

评论(1

甜心小果奶 2024-10-07 13:37:34

我会这样做:

Sub DetermineAudioLinks()
Dim p As Presentation: Set p = ActivePresentation
Dim s As Slide
Dim sh As Shape

For Each s In p.Slides
    For Each sh In s.Shapes
        If sh.Type = msoMedia Then
            If sh.MediaType = ppMediaTypeSound Then
                Debug.Print "Slide " & s.SlideNumber & ":" ; sh.Name
                If sh.MediaFormat.IsLinked Then
                    Debug.Print vbTab & "Is Linked: True"
                    Debug.Print vbTab & sh.LinkFormat.SourceFullName
                End If
            End If
        End If
    Next
Next
End Sub

请注意,上面的 MediaFormat 属性仅适用于 PowerPoint 2010 - 它不适用于早期版本的 PowerPoint。

This is the way I would do it:

Sub DetermineAudioLinks()
Dim p As Presentation: Set p = ActivePresentation
Dim s As Slide
Dim sh As Shape

For Each s In p.Slides
    For Each sh In s.Shapes
        If sh.Type = msoMedia Then
            If sh.MediaType = ppMediaTypeSound Then
                Debug.Print "Slide " & s.SlideNumber & ":" ; sh.Name
                If sh.MediaFormat.IsLinked Then
                    Debug.Print vbTab & "Is Linked: True"
                    Debug.Print vbTab & sh.LinkFormat.SourceFullName
                End If
            End If
        End If
    Next
Next
End Sub

Note the the MediaFormat property above is PowerPoint 2010 only - it won't work with earlier versions of PowerPoint.

~没有更多了~
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文