TPE
Tavvafi@gmail.com |
≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡≡
Sub EmbedLinkedCharts() ' Convert linked Excel charts to embedded charts ' Only works with PPT 2003 Dim oSh1 As Shape Dim oSh2 As Shape Dim oSl As Slide Dim x As Long For Each oSl In ActivePresentation.Slides For x = oSl.Shapes.Count To 1 Step -1 Set oSh1 = oSl.Shapes(x) With oSh1 ' is it a linked object? If .Type = msoLinkedOLEObject Then ' is it an excel chart If InStr(UCase(.OLEFormat.ProgID), "EXCEL.CHART") > 0 Then .Copy Set oSh2 = oSl.Shapes.PasteSpecial(ppPasteOLEObject)(1) oSh2.Top = .Top oSh2.Left = .Left oSh2.height = .height oSh2.width = .width .Delete ' oSh1 End If End If End With Next ' shape Next ' slide End Sub