ExcelApp.OlePropertyGet("CommandBars").OlePropertyGet("Item","Standard").OlePropertyGet("Controls").OlePropertyGet("Item","复制(&c)").OlePropertySet("Enabled",false);   
  

解决方案 »

  1.   

       for(int   n=1;n<=nSheetCount;n++)   
            {   
                  mySheet   =   m_WorkBook.OlePropertyGet("Sheets").OlePropertyGet("Item",n);   
                  mySheet.OleProcedure("Protect","康宏地磅123457",   true,   true,   true);   
            }   
            m_WorkBook.OleProcedure("Protect","康宏地磅123457",   true,   false);   
            Variant   ExcelApp   =   m_WorkBook.OlePropertyGet("Application");     ExcelApp.OlePropertyGet("CommandBars").OlePropertyGet("Item","Standard").OlePropertyGet("Controls").OlePropertyGet("Item","复制(&c)").OlePropertySet("Enabled",false);
         
    m_WorkBook   =   OleContainer1->OleObject;   
      

  2.   

      ExcelApp.OlePropertyGet("CommandBars").OlePropertyGet("Item","Standard").OlePropertyGet("Controls").OlePropertyGet("Item","复制(&c)").OlePropertySet("Enabled",false);    
     =============
    ExcelApp.CommandBars.Item['Standard'].Controls.Item['复制(&C)'].Enabled := false;