LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 14
Default getImage and VBA Callback

Hi,

First post here. I consider myself a dabbler not a programmer. So if you
can help, please help gently ;-)

Off an on for the past year or so I have been puzzling (sometimes fretting)
over how to use the ribbon attribute getImage with a VBA callback to dispaly
a custom image on a Word ribbon control. I have seen code examples using
C+,
..Net, VB, etc., which I don't have and don't know anything about, that make
me believe that it can be done. When I try a VBA
callback like:

Sub GetImage(Control As IRibbonControl, ByRef image)
Select Case Control.ID
Case "gallery1"
image = "ContentControlBuildingBlockGallery" 'This works
Case "gallery2"
image = "CustomeImage" 'Where "CustomImage" is a png format image file
'stored in the Open Office File format zip container images folder. This
doesn't work
Case Else
'Do Nothing
End Select
End Sub

Word throws an error stating "CustomImage" is not a valid office control id.

The key it seems is a process that takes a *.png format image file and
converts it into a IPicture object that Word at least thinks is a valid
office
control id and then displays that image on the ribbon.

I have ordered Ken Puls book RibbonX hoping it will provide a cookbook
explanation of how this is done.

I am awaiting the arrival of the book, but I would certainly appreciate
learning how it is done.

Thanks.


--
Greg Maxey - Word MVP

My web site http://gregmaxey.mvps.org
Word MVP web site http://word.mvps.org


 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Callback C# code from VBA Macro [email protected] Excel Programming 0 November 10th 06 11:01 AM
c xll add-in callback when closing sheet Lars Schouw Excel Programming 0 September 21st 06 05:55 AM
Problems with callback from DLL invoked from VBA Jag Man Excel Programming 4 May 2nd 04 10:58 PM
Using Excel to handle Com callback procedures Aaron Graham Excel Programming 5 February 5th 04 04:00 PM
RTD Callback and CIS with firewall Marcosia Excel Programming 0 November 26th 03 10:31 AM


All times are GMT +1. The time now is 03:30 PM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"