Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
DiscussionsAccessExcelInfoPathOutlookPowerPointPublisherWord
DirectoryUser Groups
Related Topics
Outlook ExpressInternet ExplorerWindowsMS Server ProductsMore Topics ...

MS Office Forum / General PowerPoint Questions / April 2008

Tip: Looking for answers? Try searching our database.

Automation fails in PowerPoint 2007

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Tim Witort - 08 Apr 2008 17:37 GMT
I develop Visual FoxPro applications for users on
Windows XP Pro SP2.

I have a VFP class that generates PowerPoint presentations
via automation (VBA).  It was designed using PowerPoint
2003.  We now have some users who have Office 2007
installed and this automation (not surpirsingly) fails
on these machines with OLE errors.

Before I just dig into this to see what might need to
be changed to support PPT 2007, is there a document or
web page somewhere that specifically deals with the
differences in the object hierarchy, methods, and VBA
control between PowerPoint 2003 and 2007?  I've done
some searching, but haven't come up with much.

-- TRW

_______________________________________
t i m  .  w i t o r t
_______________________________________
Shyam Pillai - 08 Apr 2008 19:18 GMT
Do you get specific error messages ? To a considerable extent backward
comptability is maintined in PPT 2007 for code created in PPT 2003 to
execute without issues.

Regards,
Shyam Pillai

Image Importer Wizard
http://skp.mvps.org/iiw.htm

>I develop Visual FoxPro applications for users on
> Windows XP Pro SP2.
[quoted text clipped - 17 lines]
> t i m  .  w i t o r t
> _______________________________________
Tim Witort - 09 Apr 2008 00:59 GMT
>>I develop Visual FoxPro applications for users on
>> Windows XP Pro SP2.
[quoted text clipped - 13 lines]
>>
>> -- TRW

> Do you get specific error messages ? To a considerable extent backward
> comptability is maintined in PPT 2007 for code created in PPT 2003 to
> execute without issues.
>
> Regards,
> Shyam Pillai

I can ask my users to give me the exact error codes and
I'll post them here.  Understand though, this is not
code created *in* PPT 2003.  This is code running in
Visual FoxPro controlling PPT via Office Automation.
If I recall correctly, the error dealt with a specific
object that wasn't found.  I'm wondering if the object
hierarchy has changed and when the code tries to access
a certain object, it is no longer there.

Also, this code updates charts and graphs that are on the
slides, so MSGraph is involved too.  Does an Office 2007
install include MSGraph or do I need to do some custom
installation to enable that?

-- TRW
_______________________________________
t i m  .  w i t o r t
_______________________________________
Steve Rindsberg - 09 Apr 2008 15:49 GMT
> I can ask my users to give me the exact error codes and
> I'll post them here.  Understand though, this is not
> code created *in* PPT 2003.  This is code running in
> Visual FoxPro controlling PPT via Office Automation.

That really shouldn't matter.  Once you have an application object, the code's
pretty much the same whether you're running it in PPT or in any other
automation controller.  The object model is the same either way, though it will
vary from version to version.

> If I recall correctly, the error dealt with a specific
> object that wasn't found.  I'm wondering if the object
> hierarchy has changed and when the code tries to access
> a certain object, it is no longer there.

> Also, this code updates charts and graphs that are on the
> slides, so MSGraph is involved too.  Does an Office 2007
> install include MSGraph or do I need to do some custom
> installation to enable that?

You may've laid your finger directly atop the problem there.

The default 2007 install does NOT include MSGraph, and even if you do install
it, if the user doubleclicks an MSGraph object, PPT will ask them if they want
to update the graph (meaning: convert it to a new-style Excel based graph).  
Most users would say yes, I expect.  

Once they do that, you can no longer access the graph through code.  

> -- TRW
> _______________________________________
> t i m  .  w i t o r t
> _______________________________________

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Tim Witort - 09 Apr 2008 17:34 GMT
>> I can ask my users to give me the exact error codes and
>> I'll post them here.  Understand though, this is not
[quoted text clipped - 24 lines]
>
> Once they do that, you can no longer access the graph through code.  

Yikes.  That's a fine how-do-you-do.  I'll have to
check the install and add MSGraph if missing.  Then
do some serious testing.  Not to mention informing
the users of the consequences of upgrading graphs.

Thanks for the tip.

-- TRW
_______________________________________
t i m  .  w i t o r t
_______________________________________
Steve Rindsberg - 10 Apr 2008 16:47 GMT
> > Once they do that, you can no longer access the graph through code.  
>
[quoted text clipped - 4 lines]
>
> Thanks for the tip.

No problem ... here's another you might find useful:

If you're going  back and forth between 2007 and 2003, and editing charts is a
consideration, you really want to stick with MS Graph charts. In PPT 2007, when
you insert a chart, it automatically inserts an Excel chart. You can change
that key in the registry so that when you choose Insert | Chart, PPT will
instead insert an MS Graph chart.

When your uses double-click that MS Graph chart in PPT 2003, it will behave
just like the charts they're used to working with.

Edit the registry on the PPT 2007 machine and add this registry key:

HKEY_CURRENT_USER/SOFTWARE/MICROSOFT/OFFICE/12.0/Common/Charting/MSGraphEnable

and set its value to 1.

So, navigate to this folder in the registry:

HKEY_CURRENT_USER/SOFTWARE/MICROSOFT/OFFICE/12.0/Common/Charting/

then Edit | New | Dword
type MSGraphEnable
and set the data value to 1

This will allow you to insert a MSGraph chart instead of an Excel chart when
you Insert | Chart, and it will also not convert the MSGraph charts to Excel
charts (which is PPT 2007's typical behavior), so you can stick with MSGraph
all the way 'round.

-----------------------------------------
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Tim Witort - 11 Apr 2008 17:23 GMT
>> > Once they do that, you can no longer access the graph through code.
>>
[quoted text clipped - 35 lines]
> charts to Excel charts (which is PPT 2007's typical behavior), so you
> can stick with MSGraph all the way 'round.

Good tip!  Thanks, Steve.

-- TRW
_______________________________________
t i m  .  w i t o r t
_______________________________________
 
Sign In
Join
My Latest Posts
My Monitored Threads
My Blog
My Photo Gallery
My Profile
My Homepage

Start New Thread
Enable EMail Alerts
Rate this Thread



©2008 Advenet LLC   Privacy Policy - Terms of Use
This website includes both content owned or controlled by Advenet as well as content owned or controlled by third parties.