Home | Contact Us | FAQ | Search & Site Map | Link to Us
Sign In | Join | Other 45 Sites in Network
Home
Discussion Groups
General
GeneralPortable MacsHardwareNetworking
Applications
Mac ApplicationsEudoraFirefox / MozillaInternet ExplorerOutlook ExpressMS OfficeEntourageExcelPowerPointWordVirtual PCMedia PlayerOther MS Products
Programming
Mac ProgrammingCodeWarriorPerl
Country Specific
Australian Mac GroupUK Mac Group

Mac Forum / Applications / PowerPoint / April 2007



Tip: Looking for answers? Try searching our database.

VBA - Image Control question

Thread view: 
Enable EMail Alerts  Start New Thread
Thread rating: 
Steve Rindsberg - 21 Apr 2007 02:35 GMT
Has anyone tried dynamically loading images into image controls in various
versions of PPT?

I'm working on a VBA form that includes one.

In PPT Windows (any version) and Mac PPT 2004, I can load a picture into the
control thus:

  Me.Image1.Picture = LoadPicture("Macintosh HD:Blah:Blah:picture.bmp")

Problem is that in Mac PPT X the same code won't compile.

Instead I get:

"Function or interface is marked as restricted or the function uses an
automation type not supported in Visual Basic."

At that point, LoadPicture is highlighted, indicating that it's the source of
Compiler Distress.  PPT X VBA Help says it should work.  

Compiler hasn't read Help, I guess.

Clues, anyone?
             

================================================
Steve Rindsberg, PPT MVP
PPT FAQ:  www.pptfaq.com
PPTools:  www.pptools.com
================================================
Jim Gordon MVP - 22 Apr 2007 00:50 GMT
Hi Steve,

Heck, I couldn't even get it to work in PowerPoint 2004.  All I got was
"object required" for bmp, and "invalid picture" for other picture types.

-Jim

Quoting from "Steve Rindsberg" <abuse@localhost.com>, in article
VA.000033a9.78ef49a3@localhost.com, on [DATE:

> Has anyone tried dynamically loading images into image controls in various
> versions of PPT?
[quoted text clipped - 26 lines]
> PPTools:  www.pptools.com
> ================================================

Signature

Jim Gordon
Mac MVP

MVPs are not Microsoft Employees
MVP info http://mvp.support.microsoft.com/

Steve Rindsberg - 23 Apr 2007 02:56 GMT
> Hi Steve,
>
> Heck, I couldn't even get it to work in PowerPoint 2004.  All I got was
> "object required" for bmp, and "invalid picture" for other picture types.

One thing I've noticed:  the UI does a nice job of hiding the case-sensitivity of
the underlying unix from the user.  VBA doesn't.  ISTR that I got some of those
kind of errors and made them go 'way by making sure to specify a filename using
the *exact* capitalization as the file itself displayed on the file system.

If that doesn't fix it, let me know and I'll cobble up a little bit of code to
send you.

Help claims it works with all kinds of file types but it seems to be wrong.  PICT
files worked here as well.  JPGs and PNGs didn'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.