View Single Post
 
Old 03-14-2015, 09:21 PM
inagalaxyfarfarawry inagalaxyfarfarawry is offline Windows 8 Office 2013
Novice
 
Join Date: Mar 2015
Posts: 8
inagalaxyfarfarawry is on a distinguished road
Default

Not sure why there was nothing there. I even accidentally posted it twice in the same thread.

This is the first I've heard about iRibbonControl. I have to confess to being a VB rookie, and programming is not my forte to boot. I've always found programming waaaaay more confusing than other people have.

I put your code into my VB, but I'm not sure how to call ButtonOnAction because I don't know what argument to put in the calling sub. I get the error message "ByRef argument type mismatch." I know I'm putting an object type as the argument instead of an instance, but I don't know how to reference iRibbonControl; if it's supposed to be something VB is passing, shouldn't it already have a name? I have to admit I've Googled Object.ID, System.ID, Application (which returns, simply, "Microsoft Word"), Office.ribbonUI, ByVals, examples, everything, and I'm more lost than when I started. Shouldn't this be as easy as assigning test(1) to a ribbon button instead of just test and having to go through all these programming gymnastics just to do something so simple?

sub test()
call ButtonOnAction(iRibbonControl)
end sub
Reply With Quote