Macro security warning with no macros in PPT 2007 - why?

G

Guest

I have created a simple presentation using PowerPoint 2003 that only contains
a combobox. There is absolutely no code anywhere. However, opening this
file in PowerPoint 2007 disables macros. Why?

My actual problem is more involved, but the bottom line is that I have
pre-2007 presentations with comboboxes that I cannot fill with data unless I
change the default macro protection setting. The actual "fill" code is a COM
AddIn, so there are no macros. However, disabling the macros also seems to
disable the comboboxes.

Works fine for PPT 2003 files opend in PPT 2003 and PPT 2007 files opened in
PPT 2007. But not PPT 2007 in compatibility mode.
 
S

Steve Rindsberg

I have created a simple presentation using PowerPoint 2003 that only contains
a combobox. There is absolutely no code anywhere. However, opening this
file in PowerPoint 2007 disables macros. Why?

What Austin said.

Try putting the presentation in a trusted location.
 
G

Guest

Austin & Steve thanks for your help.

I found a way to resolve my problem without changing the default security
settings.

The code that was failing is "Shape.OLEFormat.Object" which is supposed to
return a reference to the combobox. When a PPT 2003 format document was
opened in PPT 2007, this line was failing with:

Exception System.Runtime.InteropServices.COMException (0x80004005):
Unspecified error

However, I noticed that this exception only appeared for the first combobox
encountered. Other comboboxes were OK. This prompted me to investigate
further.

I resolved the probem by first activating the object with
"shape.OLEFormat.DoVerb(1)". Now all of the comboboxes can be filled
correctly when the document is opened.
 
S

Steve Rindsberg

The code that was failing is "Shape.OLEFormat.Object" which is supposed to
return a reference to the combobox. When a PPT 2003 format document was
opened in PPT 2007, this line was failing with:

Exception System.Runtime.InteropServices.COMException (0x80004005):
Unspecified error

However, I noticed that this exception only appeared for the first combobox
encountered. Other comboboxes were OK. This prompted me to investigate
further.

I resolved the probem by first activating the object with
"shape.OLEFormat.DoVerb(1)". Now all of the comboboxes can be filled
correctly when the document is opened.

Weird. And nice work tracking it down, Jeff. And nicer still for taking the
time to post back with the solution. Thanks!
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top