At the moment, creating 130 graphs takes 290 seconds, of which 286 are used by powerpoint. While I can alt-tab and keep powerpoint in the background, when switching to Powerpoint all the changes are being shown and you can basically see how it slows down the program. Should it be in a class module, should I do anything else or what am I doing wrong?I suspect a major reason for this is not being able to turn off screenupdating for powerpoint. Below is the code-snippet I have borrowed and an example of how I try to call it: Option Explicit ' User Defined Error codes Const ERR_NO_WINDOW_HANDLE As Long = 1000 Const ERR_WINDOW_LOCK_FAIL As Long = 1001 Const ERR_VERSION_NOT_SUPPORTED As Long = 1002 ' API declarations for Find Window() & Lock Window Update() ' Use Find Window API to locate the Power Point handle.Application object and replace them with invisibility lines: Notice that you want to put the Word. Visible = True line in an error-handler or in a spot where you know it will be run if something goes awry. (If you do get stuck with an invisible Word in the middle of a crash, you can launch the Task Manager and kill the WINWORD.EXE process.) How much of a difference does invisibility make?Please follow the below steps to execute the VBA code to save the excel file. Step 2: Press Alt F11 – This will open the VBA Editor.
Raise Number:=vb Object Error ERR_VERSION_NOT_SUPPORTED, _ Description:="Newer version." Exit Property End Select If hwnd = 0 Then Err.Article contributed by Daryl Lucas Many people know they can speed execution of Word Automation by turning off screen updating: Word. Screen Updating = False Many do not know, however, that they can get an even greater speed boost by hiding the application altogether.Here is an example from a Visual Basic client: In the above example, Word launches but does not appear anywhere on the screen. (It does, though, show up in NT's Task Manager, in its list of running processes.) Despite this apparent lack of response, Word is very active and quite capable of doing everything it is told-creating a new document, inserting the message, , saving the file, closing it, and quitting.If you need to update page numbers, you will have to show the application window before doing the update: With See Page X of Y displays or prints as Page 1 of 1, Page 2 of 2 etc. I hear rumors that you may also need to work with the Range object instead of the Selection object, but I have not tested this nearly enough to give a list because I do almost all of my work with Ranges.Updates the display on the monitor with the current information in the video memory buffer. Subsequent instructions don't update the screen until screen updating is turned on again with the Screen Updating property. but in the informal testing I've done, I've found that Visible = False makes Word work roughly 15% faster than Screen Updating = False does on identical tasks.That's about 1 second for every 7-not a trivial amount if your job runs longer than that. Chief among them is that repagination routines don't work when Word is invisible.The bad news is that it doesn't make any difference to speed in my testing in PPT 2013.You can verify that its working though by leaving it set to False. Option Explicit ' User Defined Error codes Const ERR_NO_WINDOW_HANDLE As Long = 1000 Const ERR_WINDOW_LOCK_FAIL As Long = 1001 Const ERR_VERSION_NOT_SUPPORTED As Long = 1002 ' API declarations for Find Window() & Lock Window Update() ' Use Find Window API to locate the Power Point handle.You can use this method after using the Screen Updating property to disable screen updates. This example turns off screen updating, opens Test.doc, inserts text, refreshes the screen, and then closes the document (with changes saved). Screen Refresh turns on screen updating for just one instruction and then immediately turns it off.