Shapes.AddOLEObject method not working in PowerPoi

2019-07-24 20:27发布

问题:

I am using the following code to add web browser control to PowerPoint slide,

Set oShp = oSld.Shapes.AddOLEObject(Left:=100, Top:=100, Width:=200, Height:=300, Classname:="Shell.Explorer", Link:=msoFalse)

The above code works fine in all PowerPoint versions except PowerPoint 2013 (32bit and 64bit). I get the following error message,

In PowerPoint 2010 (32bit and 64bit) the web browser control is added but the control is black until viewing it in Slide Show. Then it gets refreshed.

How to fix this?

回答1:

You are seeing the error because Web Browser Control are made obsolete in Office 2013 for security reasons.

There is a workaround HOWEVER, it will put your machines at risk of vulnerability attacks

http://support.microsoft.com/kb/2793374