我正在尝试使用 VBA 脚本通过 Excel 更新带有嵌入图表的 PowerPoint 演示文稿。这适用于我的代码。问题是我还希望 - 在图表更新后 - 断开/删除指向 Excle 工作表的链接。
代码示例还显示了我的代码以及不起作用的行。
任何建议或解决方案将不胜感激!
Function RefreshPPT()
Set PPT = CreateObject("PowerPoint.Application")
PPT.Visible = True
PPT.Presentations.Open "Name.pptx", Untitled:=msoTrue
PPT.ActivePresentation.UpdateLinks
PPT.ActivePresentation.BreakLinks ------ this line doesn´t work
PPT.ActivePresentation.SaveAs Filename:="Name2.pptx"
PPT.Quit
Set PPT = Nothing
End Function