Before I run a certain part of my script, set Displaying to 0.
When done, I return Displaying to 1. The script has finished running (I can scroll through the open file, switch between files) but the file is not displayed (sort of blank page). Only when I try to close the file, its contents appears on the screen.
Any idea what could be the cause of this problem?
Thank you in advance!
// Turn off document display. If Displaying = 1 Set Displaying = 0; EndIf //... // Restore the document display and refresh the screen. If Displaying = 0 Set Displaying = 1; Update DocObject(oDoc) Redisplay; EndIf
The key line is 11, where you "refresh" the screen. It is like pressing Control+L.
Thank you for your response! I didn't realize there is a need to test for the Displaying setting. I just used to set it to either 0 or 1.
The If statement made the difference.
Thank you again!