Все связанные объекты (связанные с Excel) в PowerPoint больше не распознаются, поскольку ИТ-специалисты перенесли сервер на новый путь и отключили старый.
Я попытался использовать приведенный ниже макрос из (https://exceloffthegrid.com/edit-links-in-powerpoint-using-vba/), но из-за того, что старый сервер больше не работает, когда макрос пытается открыть путь к старому файлу, он выдает ошибки
Есть ли альтернативное решение?
Sub EditPowerPointLinks()
Dim oldFilePath As String
Dim newFilePath As String
Dim pptPresentation As Presentation
Dim pptSlide As Slide
Dim pptShape As Shape
'The old file path as a string (the text to be replaced)
oldFilePath = "String of\File Path\To Be Replaced\Excel File.xlsx"
'The new file path as a string (the text to replace with)
newFilePath = "String of\New File Path\Excel File 2.xlsx"
'Set the variable to the PowerPoint Presentation
Set pptPresentation = ActivePresentation
'Loop through each slide in the presentation
For Each pptSlide In pptPresentation.Slides
'Loop through each shape in each slide
For Each pptShape In pptSlide.Shapes
'Find out if the shape is a linked object or a linked picture
If pptShape.Type = msoLinkedPicture Or pptShape.Type _
= msoLinkedOLEObject Then
'Use Replace to change the oldFilePath to the newFilePath
pptShape.LinkFormat.SourceFullName = Replace(LCase _
(pptShape.LinkFormat.SourceFullName), LCase(oldFilePath), newFilePath)
End If
Next
Next
'Update the links
pptPresentation.UpdateLinks
End Sub