We've got a C# application, written in Visual Studio 2017, which automates the data entry for a series of embedded Excel charts in a PowerPoint application. Lately, seemingly out of the blue, the code freezes at certain points when it is interacting with the Excel object. In particular, it seems this line is a problem: Excel.Workbook xlWorkbook = (Excel.Workbook)shape.OLEFormat.Object;
It will stick there and stay there for hours. It doesn't throw an error.
I've tried uninstalling and reinstalling Office fresh. Doesn't help. I'm stumped. I'm just looking for any kind of suggestion of approaches to the problem, what to look at, etc.
Edit: I supposed I should provide a little more information. In this process, we open up two Powerpoints. The first is called a "master", and contains a "library" of slides with charts of different configurations on them. The application, based on the values of certain field in records retrieved from a db, copies slides from the "master" into the new presentation, then connects to the charts, retrieves the data for them from the db, and fills them in. These new presentations can have anywhere from 100 to 300 slides in them, and many of them are copied from the exact same slide in the "master". In other words, multiple copies of the same slide and chart are filled in during the creation of a new presentation. And all of this happens over and over; the application may create hundreds of these new presentations in a session. So, there are many many times when there is no problem connecting to a given chart. But then, all of a sudden, 20 presentations in, and a 100 and some charts into a presentation, bam. Other times, it happens almost immediately, during the first few slides in the first presentation. And, this has all been running fine for a few months. Now, all of a sudden, we've got a problem.