Using VBA to locate embeded charts in powerpoint

nikulina

New Member
Joined
Apr 28, 2008
Messages
25
For security reasons l need to make sure that my powerpoint files do not have embeded charts in them. I.e. charts that you can click on and the excel file is displayed.

I was wondering if anyone can think of some VBA code to find embded charts, but ignoring pictures of graphs etc. All l would need is an error box if the code finds one!

I am only just learning VB and would appreciate any and all help.

Many thanks in advance
 

Excel Facts

Last used cell?
Press Ctrl+End to move to what Excel thinks is the last used cell.
Hi,

Try this in PowerPoint VBA:
Rich (BB code):

' VBA PowerPoint
Sub FindEmbedded()
  Dim sld As Slide, sh As Shape, i As Long
  For Each sld In ActivePresentation.Slides
    For Each sh In sld.Shapes
      If sh.Type = msoEmbeddedOLEObject Then
        i = i + 1
        sh.Select
        If MsgBox("Embedded OLE Objects found: " & i & vbLf & _
               "ID = " & sh.OLEFormat.progID & vbLf & vbLf & _
               "Continue?", vbYesNo, _
               "Scan of embedded objects") <> vbOK Then Exit Sub
      End If
    Next
  Next
End Sub

Regards,
Vladimir
 
Upvote 0

Forum statistics

Threads
1,223,785
Messages
6,174,537
Members
452,571
Latest member
MarExcelTips

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top