Solved

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

Posted on 2014-10-04
4
1,001 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:versatilebb
  • 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:
versatilebb 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:versatilebb
ID: 40374615
Found solution elsewhere.  Appreciate the input from both experts, but neither one had the correct answer.
0

Featured Post

3 Use Cases for Connected Systems

Our Dev teams are like yours. They’re continually cranking out code for new features/bugs fixes, testing, deploying, testing some more, responding to production monitoring events and more. It’s complex. So, we thought you’d like to see what’s working for us.

Question has a verified solution.

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

Setting the Scene Animations in PowerPoint are a great tool to convey messages when used carefuly with the content of your slides. There are plenty of animation effects and options, including a Repeat feature for individual animation effects. …
PowerPoint is the go-to presentation software for millions of users around the world. Many presentations use basic text features but you can really make special text jump out of your slide by applying this bubble text design process. This article ha…
This video shows and describes the main difference between both orientations in Microsoft Word. Viewers will understand when to use each orientation and how to get the most out of them.
This video walks the viewer through the process of creating Hyperlinks for the web and other documents. Select the "Insert" tab: Click "Hyperlink":  Type "http://" followed by a web address to reference a website or navigate to a document to ref…

832 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