code to break links

  • Thread starter Thread starter Nicky
  • Start date Start date
N

Nicky

Hi

I have a presentation with c170 charts linked from excel. I want t
break the links, but whenever I click edit links, pp freezes.

Can anyone help with the code to break all the links in a presentation
or is there another way anyone can suggest?

I'm using Powerpoint 200
 
I have a presentation with c170 charts linked from excel. I want to
break the links, but whenever I click edit links, pp freezes.

Can anyone help with the code to break all the links in a presentation?
or is there another way anyone can suggest?

Another way to break the link is to ungroup then regroup the chart.
 
Thanks, Steve, works a treat.

For anyone else with the same issue, this code using Steve's suggestio
worked for me:

Sub break_all_chart_picture_links()
res = MsgBox("WARNING!!!" & Chr(13) & "this macro breaks all the char
picture links in this presentation by converting them to ungroupe
pictures and then reassembling them." & Chr(13) & "Do you wish t
proceed?", vbYesNo)
If res = 6 Then
For n = 1 To ActivePresentation.Slides.Count
ActiveWindow.View.GotoSlide Index:=n
For Each sh In ActiveWindow.Selection.SlideRange.Shapes
sh.Select
On Error Resume Next
ActiveWindow.Selection.ShapeRange.Ungroup.Select
If Error = "" The
ActiveWindow.Selection.ShapeRange.Group.Select
Next
Next

End If

End Su
 
Nicky, here's another little trick - see additions to your macro:

Thanks, Steve, works a treat.

For anyone else with the same issue, this code using Steve's suggestion
worked for me:

Sub break_all_chart_picture_links()
res = MsgBox("WARNING!!!" & Chr(13) & "this macro breaks all the chart
picture links in this presentation by converting them to ungrouped
pictures and then reassembling them." & Chr(13) & "Do you wish to
proceed?", vbYesNo)
If res = 6 Then

Instead of moving to each slide and doing all the selecting you've done, try
this. Much faster.

For n = 1 To ActivePresentation.Slides.Count
For Each sh in ActivePresentation.Slides.Shapes
' Ungroup only linked or embedded objects
If sh.Type = 7 or sh.Type = 10 Then
Sh.Ungroup.Group
End if
Next Sh
Next n

End Sub
 
Back
Top