Share via

ribbon onload

Anonymous
2010-11-29T12:32:36+00:00

Hi

I have a problem with my ribbon object

In the onload callback I set a global variabel "myribbon" to the ribbon object

It all works ok but if a error is thrown, all global variables is set to nothing and I need a way to get hold of my ribbon object again so that for ex the myribbon.invalidate can work again.

Is there a way to find the ribbon object again?

Microsoft 365 and Office | Word | For home | Windows

Locked Question. This question was migrated from the Microsoft Support Community. You can vote on whether it's helpful, but you can't add comments or replies or follow the question.

0 comments No comments

Answer accepted by question author

Anonymous
2010-11-29T14:55:54+00:00

I don't think you can. Once the connection to the ribbon is lost the only way back I have found is to reload the workjbook

--

HTH

Bob

<Lina E> wrote in message news:*** Email address is removed for privacy ***...

Hi

I have a problem with my ribbon object

In the onload callback I set a global variabel "myribbon" to the ribbon object

It all works ok but if a error is thrown, all global variables is set to nothing and I need a way to get hold of my ribbon object again so that for ex the myribbon.invalidate can work again.

Is there a way to find the ribbon object again?

Was this answer helpful?

0 comments No comments

3 additional answers

Sort by: Most helpful
  1. Rory Archibald 18,965 Reputation points Volunteer Moderator
    2011-01-07T14:32:25+00:00

    I don't know where you would store it in Word (I'm more of an Excel guy), but if you use ObjPtr to get a pointer to the ribbon object in OnLoad, you can then store that address (Long integer) somewhere and use CopyMemory to reset it if needed. Seethis thread for details and a link to a sample file.


    HTH, R.

    Was this answer helpful?

    0 comments No comments
  2. Anonymous
    2010-11-30T07:18:31+00:00

    Ok, thanks

    Was this answer helpful?

    0 comments No comments
  3. Anonymous
    2010-11-29T13:24:38+00:00

    Hello Lina,

    Lina E wrote:

    I have a problem with my ribbon object In the onload callback I set

    a global variabel "myribbon" to the ribbon object It all works ok

    but if a error is thrown, all global variables is set to nothing

    Add an error handling to all Functions/Subs.

    and I need a way to get hold of my ribbon object again so that for

    ex the myribbon.invalidate can work again. Is there a way to find

    the ribbon object again?

    No.

    HTH

    Gunter


    Access FAQ: http://www.donkarl.com

          http://www.avenius.com -http://www.AccessRibbon.com

    http://www.ribboncreator.com -http://www.ribboncreator2010.com

    Was this answer helpful?

    0 comments No comments