Collection is readonly. Cannot change the content of the collection.
                            
                         
                        
                     
                 
                
                    
Hi all,
        I am working on a VSTO word addin, where i am getting the Ribbon buttons dynamically from external XML file. This is working fine. In my addin, there is a functionality of disabling a button based on some condition. This is also working fine.
        The Problem is " Suppose i have two documents opened, I disabled the button(by clicking on it) on one document, it will be disabled. but when i opened another document simoultaneously ,this document's button also getting disabled.
        For this, I have written a piece of code to Enable the Button based on some condition in 'WindowActive' Event. I am getting the Error Such That        
        
                "Collection is readonly. Cannot change the content of the collection."
Any help will be greatly appreciated.
Thanks, 
K.S.R. Prasad.