ich versuche grade über .breaklink von Excel aus in einer Powerpoint die externen Verknüpfungen zu löschen.
Das spannende ist, dass der auskommentierte Befehl .update funktioniert,
bei BreakLink bekomme ich aber den Laufzeitfehler 91.
Für Ideen bin ich euch dankbar!
Sub LinksKillen()
Dim SldCount As Integer
Dim ShpCount As Integer
Dim objShape As Object
Dim oSld As Object
Dim oShp As Object
Dim y As Integer
Dim a As Integer
With objPPTApp
Set objPPTApp = CreateObject("PowerPoint.Application")
Set objPPPraes = objPPTApp.Presentations.Open("C:\Users\Admin\Desktop\Report\Planung _
2014_1_.ppt")
SldCount = objPPTApp.ActivePresentation.Slides.Count
For y = 1 To SldCount
Set oSld = objPPTApp.ActivePresentation.Slides(y)
ShpCount = objPPTApp.ActivePresentation.Slides(y).Shapes.Count
objPPTApp.ActivePresentation.Slides(y).Select
For a = 1 To ShpCount
For Each oShp In oSld.Shapes
objPPTApp.ActivePresentation.Slides(y).Shapes(a).Select
If oShp.Type = msoLinkedOLEObject Then
'.LinkFormat.Update
.LinkFormat.breaklink
End If
Next oShp
Next a
Next y
End With
End Sub