Deploying user defined chart in client machine

Hi,

I just tried using VSTO 2005 to build one Excel template application.

During the workbook_open event I have to store USerdefined-Custom type chart in the client machine

I tried out the following code,

Application.AddChartAutoFormat. But it is showing an error like this,

"Attempted to read or write protected memory. This is often an indication that other memory is corrupt" .

But when I tried out it in workBook_shutDown event, it was worked, but after sometime i again tried the code but it is not working.

Also I tried out in test machine, there also the code is not working.

If any one can help please send the reply.



Answer this question

Deploying user defined chart in client machine

  • Stephen W

    Hi,

    Thanks for your comments. I will explain my scenario in detail. I want to add my custom created chart to the user's gallery at the same instant, the user opens the template from his/her machine. So that all the charts he/she generating will have some default apperance and that is of the custom created chart, added to user's xlgallery.So I want it in the start up event itself.  I had tried out it in workbook project and working fine. But in template project  it is not working.  Once again thanks for your comments.

     


  • Sumardi

    Can you check this in VBA - if you;re ruinning into the same problem

    Best regards


  • Raghavendra Prabhu MSFT

    Have you tried the AddChartAutoFormat in a SelectionChange event on one of the sheets Or keying off a different event or than the _Startup or _Shutdown There is an issue with some Excel commands in the _Startup event. I'm sure not the answer you were looking for, but I hope it helps.

    Roger


  • SivaKrishna Varma

    First of all thanks for your comments. ya, it is working fine with VBA.
  • Deploying user defined chart in client machine