Open Clip Art Gallery through VBA

L

Leonard

Hi

I want to open the Clip Gallery from vba and paste the user's selected
clipart into a picture object on an MS Access form.

I've searched the net and this user group and couldn't find anything useful.
I didn't get a reply on the Access Programming group so, thought I might have
some more luck here.

I thought of using the shell function, but wasn't sure how to take control
of the final selected clipart.

Plus, I believe that in different versions of Office the clip gallery has
different exe file names and is stored in different locations!

Any reference or help would be greatly appreciated.

Leonard
 
G

Gary''s Student

This works in Excel. You may be able to adapt it to Access. In Excel the
gallery is manually opened by:

Insert > Picture > From Clipart

We can make VBA do the same thing:


Sub gallery()
Application.SendKeys ("%i")
Application.SendKeys ("P")
Application.SendKeys ("C")
End Sub


basically using sendkeys to play the same melody on the keyboard as your
fingers would.
 
L

Leonard

Hi, and thanks for the reply.

I've had a real hard time trying to figure this one out.

That's a great solution in Excel but doesn't work in Access as Gallery is
not included in any toolbars.

I could open Excel from Access through VBA and use your code. However, do
you know how to control and return the user's selection?

Cheers

Leonard
 
G

Gary''s Student

I don't know enough about the Access to Excel interface to answer the question.

Sorry
 

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