[Okta Webinar] Learn how to a build a cloud-first strategyRegister Now

x
  • Status: Solved
  • Priority: Medium
  • Security: Public
  • Views: 1389
  • Last Modified:

How do I stop screen updating in powerpoint using VSTO?

I have a piece of VSTO c# code that manipulates a PowerPoint presentation, specifically by building a large table on a slide by copying each row from another document one row at a time.

This causes the screen to flicker, is there are way of stopping the screen updating while the code is running? In excel I would use Application.ScreenUpdating = False, but that does not exist for PPT.
0
SimonReid1
Asked:
SimonReid1
  • 2
  • 2
1 Solution
 
MegazzillaCommented:
Hi!

I found this piece of sotware that can replace the Application.ScreenUpdating = False. It is not in C# but I think it can give you some useful suggestion regarding your problem.

Follow this link: http://skp.mvps.org/ppt00033.htm

Bye.
:)
0
 
SimonReid1Author Commented:
I have tried that code but it does not work..  My code works by copying selected rows from one document and pasting into another, locking doesn't seem to work in this case :-(
0
 
irudykCommented:
One suggestion would be to keep the Powerpoint and the other application hidden while you are manipulating the presentation (i.e. copying rows from the one application to the Powerpoint presentation) and only make the presentation visible once you are done.
So if somewhere in your code you are creating application objects (one for the source document you are copying from and one for Powerpoint), set each object's Visible property to True only after all of the data manipulation is done.
0
 
irudykCommented:
Also, if you don't want to hide the display of the files, you could try adding the following to your PowerPoint VBA code - see code at http://skp.mvps.org/ppt00033.htm
0
 
SimonReid1Author Commented:
The solution worked, but as you said it was not in C# so took a fair bit of work to translate it
0

Featured Post

Free Backup Tool for VMware and Hyper-V

Restore full virtual machine or individual guest files from 19 common file systems directly from the backup file. Schedule VM backups with PowerShell scripts. Set desired time, lean back and let the script to notify you via email upon completion.  

  • 2
  • 2
Tackle projects and never again get stuck behind a technical roadblock.
Join Now