C
Colleyville Alan
I've been working with an app that uses Automation to update some PPT
slides. Thw app used to copy 10 - 15 slides to a "template" file, update 3
slides with embedded graph objects, and save the file all in about 25
seconds. Now, I am modifying the code to skip the copying of other slides -
I just want it to update some graphs on 3 slides. The graph update used to
take about 3 seconds to do 3 slides. Now, the exact same code is taking
about 45 seconds per slide. When i step thru in debug, each element that is
updated takes 6 or 7 seconds.
I use a Case/Select statement to choose the slide and update from an array.
Here is a portion of that code
Case 9
oGraph.Application.Update 'Saves the graph updates
For iCtr = 1 To UBound(ResultsArray)
oGraph.Application.DataSheet.Cells(1, (iCtr + 1)) =
ResultsArray(iCtr).strFundName
oGraph.Application.DataSheet.Cells(2, (iCtr + 1)) =
ResultsArray(iCtr).numMarketValue
oGraph.Application.Update 'Saves the graph updates
Next iCtr
I have Office 2000 and the code may have used the previous version of PPT
when I wrote it. But it is incredibly slow. Any ideas what's wrong?
2 more questions:
1 - the line "oGraph.Application.Update" is at the end of the For-Next loop
on each slide. Is there a better place for it? I'm not sure how to get it
executed right when the loop ends.
2 - Now PPT has trouble opening presentations. I though that there might
be a "ghost image floating around that was corrupting memory. So I shut
down last night and when I booted this AM, I opened PPT before I did
anything else. The progress bar showed it getting to about 90% of a file
and then freezing. The file is about 14 pages and 600k with 3 embedded
graphs. WHen I use the external PPT viewer, I can view it just fine. It
seems as though PPT is corrupted. Do I need to do a full reinstall, or is
there a way to repair this? Is this related to the slow spped issue?
Thanks
slides. Thw app used to copy 10 - 15 slides to a "template" file, update 3
slides with embedded graph objects, and save the file all in about 25
seconds. Now, I am modifying the code to skip the copying of other slides -
I just want it to update some graphs on 3 slides. The graph update used to
take about 3 seconds to do 3 slides. Now, the exact same code is taking
about 45 seconds per slide. When i step thru in debug, each element that is
updated takes 6 or 7 seconds.
I use a Case/Select statement to choose the slide and update from an array.
Here is a portion of that code
Case 9
oGraph.Application.Update 'Saves the graph updates
For iCtr = 1 To UBound(ResultsArray)
oGraph.Application.DataSheet.Cells(1, (iCtr + 1)) =
ResultsArray(iCtr).strFundName
oGraph.Application.DataSheet.Cells(2, (iCtr + 1)) =
ResultsArray(iCtr).numMarketValue
oGraph.Application.Update 'Saves the graph updates
Next iCtr
I have Office 2000 and the code may have used the previous version of PPT
when I wrote it. But it is incredibly slow. Any ideas what's wrong?
2 more questions:
1 - the line "oGraph.Application.Update" is at the end of the For-Next loop
on each slide. Is there a better place for it? I'm not sure how to get it
executed right when the loop ends.
2 - Now PPT has trouble opening presentations. I though that there might
be a "ghost image floating around that was corrupting memory. So I shut
down last night and when I booted this AM, I opened PPT before I did
anything else. The progress bar showed it getting to about 90% of a file
and then freezing. The file is about 14 pages and 600k with 3 embedded
graphs. WHen I use the external PPT viewer, I can view it just fine. It
seems as though PPT is corrupted. Do I need to do a full reinstall, or is
there a way to repair this? Is this related to the slow spped issue?
Thanks