我正在使用以下代码更新Powerpoint文档中的所有链接:
Sub UpdateExcelLinks()
For Each sld In ActivePresentation.Slides
For Each sh In sld.Shapes
If sh.Type = msoLinkedOLEObject Then
sh.LinkFormat.Update
End If
Next
Next
MsgBox "Links uppdated"
End Sub
在我将Powerpoint文档设置为“最终/只读”或“限制访问”模式之前,它工作正常。
然后它不再起作用,我得到的只是以下消息:
运行时错误'-2147188160(80048240)': LinkFormat.Update:无效的请求。演示文稿无法修改。
该如何做才能在这些模式下更新我的Powerpoint文档?