我想查看視頻是否使用vba鏈接。爲此,我檢查了形狀的參數,並且看到我的視頻已鏈接LinkFormat參數已啓用,並且未啓用。問題是,如果我檢查LinkFormat時,它不是一個鏈接的視頻,我收到一個錯誤「對象不存在」。我只是想檢查它是否存在或沒有錯誤。如何知道形狀參數是否存在
我試圖把一個錯誤處理程序,但無論如何,它給我的錯誤。
編輯:下面我把我怎麼樣我試圖用我接受這個職位的建議,使之:
For Each sld In ActivePresentation.Slides
For i = 1 To sld.Shapes.count
If sld.Shapes(i).Type = msoMedia Then
If hasVideo = False Then
hasVideo = True
End If
videoNum = videoNum + 1
If sld.Shapes(i).MediaType = ppMediaTypeMovie Then
If CSng(Application.Version) < 14 Then
If hasVideo = False Then
hasVideo = True
End If
videoNum = videoNum + 1
Else
If sld.Shapes(i).MediaFormat.IsEmbedded Then
If hasVideo = False Then
hasVideo = True
End If
videoNum = videoNum + 1
Else
MsgBox "linked videos are not supported and won't be shown"
End If
End If
End If
End If
Next i
Next
顯示你的代碼,如果可能的話... – dee