Guido1

Hey,

I am writing a COM add-in for Word which implements my own toolbars. On my (developer) PC the toolbar button states update automatically after exiting the method.

However, on the testing machine the state of the button changes but visually it does not. i.e. a method causes the toolbar to become disabled but the buttons appear, visually, to be enabled but its actual state is disabled. The buttons will refresh/update themselves after I do something with Word e.g. minimize and then maximize!!!

Is there a method for forcing an update on Word

Cheers

Guy



Re: Visual Studio Tools for Office Method to refresh/update Word toolbar state

Cindy Meister

Have you tried the ScreenRefresh method of the Application object




Re: Visual Studio Tools for Office Method to refresh/update Word toolbar state

Guido1

I did try that but it didn't work!



Re: Visual Studio Tools for Office Method to refresh/update Word toolbar state

Guido1

I found a workaround!

Code Snippet

if(commandBar.Visible == true)

{

commandBar.Visible = false;

commandBar.Visible = true;

}

Thanks,

Guy