Trapping System Errors in a Global Module (1 Viewer)

nrgins

Member
Local time
Yesterday, 20:10
Joined
Jul 12, 2016
Messages
37
Interesting. I hadn't heard that before.

BTW, on a different topic, I just posted about a different issue. If you had any insights into that, it would be appreciated.

Thanks!
 

ebs17

Well-known member
Local time
Today, 03:10
Joined
Feb 7, 2020
Messages
2,041
There is no need to worry about physical storage. If the amounts of data used (recordsets) are very large and the main memory provided cannot hold them, they are moved and exchanged with the swap file. Since the I/O actions are slower there, only the required runtime is longer.

Unlike @The_Doc_Man, I think the Word object is a very large one. If you load Word via late binding, you will feel it through the time it takes. Repeatedly loading Word could result in noticeably slower procedures if the cache was cleared as well.
 

nrgins

Member
Local time
Yesterday, 20:10
Joined
Jul 12, 2016
Messages
37
Thanks for the insights. The fact remains, though, that I don't think keeping Word open would work for me, since sometimes the document is opened in Word for review and possible printing; other times (as in this case), it's created in Word, exported to PDF, and then Word is closed.

So, since there are times when the users will interact directly with Word, I don't see how I could keep an instance open and hidden.
 

The_Doc_Man

Immoderate Moderator
Staff member
Local time
Yesterday, 20:10
Joined
Feb 28, 2001
Messages
27,574
@ebs17 - The Word object is not significantly much larger than the file on which it is working unless you are looking at something minuscule even for a Word file, but there IS a point I glossed over. Exporting to PDF causes a momentary doubling (or slightly MORE than doubling) of the size since the original and the PDF versions have to temporarily co-exist. And as to Windows Memory Dynamics, you are right that a lot of swapping would go on - but Windows allows tasks to "borrow" memory to increase their working set when under relatively light loads so as to reduce swap rates. On a stand-alone O/S, there won't be THAT much contention for memory unless you have a tiny RAM size.
 

ebs17

Well-known member
Local time
Today, 03:10
Joined
Feb 7, 2020
Messages
2,041
The Word object is not significantly much larger than ...
But it is noticeably large. In a loop, you certainly don't want to reload it every time. THAT was my statement.

You could also say: If loading Word is added to loading a document, that is significant.
 

Users who are viewing this thread

Top Bottom