Hi,
I've a macro that I used with some ppt's in office 2007 to reduce the size of some links within the ppt to an excel file. Recently I've installed the Office 2013 and the macro crashed with the following error:
Here is the code I have:![]()
Shape.select: invalid request. To select a shape, its view must be active
I believe now, I've to activate each shape in every slide but I don't know how to do it. I've tried to use an integer to point to each slide but I had no success.![]()
Sub reduce() For Each curr_slide In ActivePresentation.Slides curr_slide.Select For Each oSh In curr_slide.Shapes If oSh.Type = msoLinkedOLEObject Then Set oSh = curr_slide.Shapes(3) With oSh '.LinkFormat.BreakLink .Select .LockAspectRatio = False .Height = 14 * 28.33 .Width = 33.5 * 28.33 .Cut Set oSh = curr_slide.Shapes.PasteSpecial(DataType:=ppPastePNG) .Height = 10 * 28.33 .Width = 23 * 28.33 .Left = 1.2 * 28.33 .Top = 1.85 * 28.33 .ZOrder (msoSendToBack) End With End If Next oSh Next curr_slide End Sub
Can someone help me?!
Bookmarks