T
timeless
I would like to use this code to break links in my ppt presentations,
but it seems it works only in debug mode: (step by step)
Sub BreakLinks()
Dim oSld As Slide
Dim oShp As Shape
Dim oCmdButton As CommandBarButton
Set oCmdButton = CommandBars("Standard").Controls.Add(ID:=2956)
ActiveWindow.ViewType = ppViewSlide
For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Type = msoLinkedOLEObject Then
ActiveWindow.View.GotoSlide oSld.SlideIndex
oShp.Select
Application.CommandBars.FindControl(ID:=2956).Execute
' Do not forget to add this line else you will get erratic
' results since the code execution does not halt while menu
' command is executed hence we have to let the execution
' complete before proceeding.
DoEvents
End If
Next oShp
Next oSld
oCmdButton.Delete
End Sub
any idea ?
but it seems it works only in debug mode: (step by step)
Sub BreakLinks()
Dim oSld As Slide
Dim oShp As Shape
Dim oCmdButton As CommandBarButton
Set oCmdButton = CommandBars("Standard").Controls.Add(ID:=2956)
ActiveWindow.ViewType = ppViewSlide
For Each oSld In ActivePresentation.Slides
For Each oShp In oSld.Shapes
If oShp.Type = msoLinkedOLEObject Then
ActiveWindow.View.GotoSlide oSld.SlideIndex
oShp.Select
Application.CommandBars.FindControl(ID:=2956).Execute
' Do not forget to add this line else you will get erratic
' results since the code execution does not halt while menu
' command is executed hence we have to let the execution
' complete before proceeding.
DoEvents
End If
Next oShp
Next oSld
oCmdButton.Delete
End Sub
any idea ?