NetOfficeFw / NetOffice

🌌 Create add-ins and automation code for Microsoft Office applications.

Geek Repo:Geek Repo

Github PK Tool:Github PK Tool

Powerpoint - not retaining changes to the document unless frequent saves

Offbeatmammal opened this issue · comments

we've been seeing a very intermittent problem since upgrading to 1.9.3 (just updated to 1.9.4 so not really had any test results yet), but may also be one of the many Powerpoint upgrades since then as well.

we have a application that takes a fairly large powerpoint (some of the templates can be 100+ pages) and goes through updating each slide with data relevant to the desired output. most of the time, it works fine. occasionally however when we finally save the presentation that's been processed, none of the changes are retained. As a test, I put in an initial save that changes some things on the first few pages and writes that out, then continues. when the error occurs, those initial changes are saved, but nothing after that (or more frustratingly some slides are not updated but then others are).

as a workaround we initially put in a save after updating each slide - problem seems to be solved, but increases the runtime significantly (can be 4-5x with the larger reports) so now doing a save every 5 slides as a trade off (but as powerpoint doesn't seem good at managing incremental saves, it still adds overhead)

given the intermittent nature of this, I suspect memory management/garbage collection may be coming into play somewhere, (given all the moving pieces) so we do have a plan to spend some time next sprint on optimising and profiling our app as well.

I realise this isn't a very helpful bug report (so feel free to close), but curious if anyone has seen similar behaviour, and any strategies that might work better to alleviate it

Do you use automation to process files?