?
Solved

VBA: Unable to load picture into image control in UserForm when using Office 2011 for Mac

Posted on 2014-10-04
4
Medium Priority
?
1,142 Views
Last Modified: 2014-10-11
Programming in VBA in MS PowerPoint 2011 for Mac, I am having trouble loading a picture into a UserForm image control.  I have done this successfully hundreds of times in Office 2007 and 2010 for Windows.  

After adding the image control to my UserForm, in the Properties pane, I can usually click on Picture, then browse to select a .jpg file on my computer, after which the word (Bitmap) shows in the Properties pane and the picture appears in the image control.  But when I try to do this on a Mac, it lets me browse, but all .jpg files are greyed out and not selectable.  I have tried cutting and pasting a shortcut to the .jpg directly into the Picture row of the properties pane without success.  

I have also tried loading the picture at runtime using a command such as "me.myImageControl.Picture = LoadPicture (myjpg)."  But this method, which I've used many times in Windows, generates an error and does not appear to be supported in VBA for the Mac.   I tried all this in Word 2011 with the same results, so it's not just PowerPoint.

There must be a way to do this, because the Image control has a Picture property with a browse button.  

Any help would be greatly appreciated!
0
Comment
Question by:Bryce Bassett
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
4 Comments
 
LVL 12

Expert Comment

by:James Elliott
ID: 40361930
What happens when you double click the file in the file browser? Does it open into photo software? IE. does your mac associate with the jpg extension?
0
 
LVL 23

Expert Comment

by:JSRWilson
ID: 40363387
It is pretty broken on Macs.

http://www.rondebruin.nl/mac/mac024.htm
0
 

Accepted Solution

by:
Bryce Bassett earned 0 total points
ID: 40365107
With some help from our friends at the Microsoft forum, I discovered that only 24-bit BMP is supported in image controls for Office 2011.  Ron's link says they are not, but it's working for me.  

http://answers.microsoft.com/en-us/mac/forum/macoffice2011-macpowerpoint/vba-unable-to-load-picture-into-image-control-in/2fc232bd-0029-4f06-96f9-cd675a61dae1
0
 

Author Closing Comment

by:Bryce Bassett
ID: 40374615
Found solution elsewhere.  Appreciate the input from both experts, but neither one had the correct answer.
0

Featured Post

Enroll in September's Course of the Month

This month’s featured course covers 16 hours of training in installation, management, and deployment of VMware vSphere virtualization environments. It's free for Premium Members, Team Accounts, and Qualified Experts!

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

After seeing numerous questions for Dynamic Data Validation I notice that most have used Visual Basic to solve the problem. This suggestion is purely formula based and can be used in multiple rows.
New style of hardware planning for Microsoft Exchange server.
The viewer will learn how to  create a slide that will launch other presentations in Microsoft PowerPoint. In the finished slide, each item launches a new PowerPoint presentation and when each is finished it automatically comes back to this slide: …
Visualize your data even better in Access queries. Given a date and a value, this lesson shows how to compare that value with the previous value, calculate the difference, and display a circle if the value is the same, an up triangle if it increased…

718 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question