MWE
07-23-2008, 01:35 PM
I have a large number of VBA applications that run with target Word files. All VBA code resides in one of the half dozen .dot files in ...Word/STARTUP. I have not used Norrmal.dot becuase of the problems with Normal.dot in Office2000. It has worked out well and keeps the individual .dot files of reasonable size.
Many of these applications have "first time run" information files that are accessed the first time a particular application is run against a target Word file. This information is pulled from xls spreadsheets and the application creates DocumentProperties in the target file. From that point forward, the xls spreadsheet data is not used again with that file. Because this is a one time event, using xls spreadsheets works well and the extra 10 to 20 seconds it takes to create the xls object, etc., is no big deal.
During the conversion process from Office2k to Office03, I have been rethinking how things are done and there are several cases where the xls spreadsheet model is not very efficient. Applications that can be run on any Word file and no doc props are created is a good example. In some of these applications, an xls spreadsheet is accessed the first time the application is run and data is stored in global variables. If Word is shut down and started later, the process is repeated. In the interest of efficiency I played around with "pseudo spreadsheets" to see if I could speed this up. I created a Word file with a half dozen bookmarked tables and stored it in the STARTUP folder. Rather than accessing an xls file, the applications access the word tables file. This is noticeably faster for small tables. For several applications where the amount of data is sucked from a 3 col by 10 row table, there is no perceptable delay.
So, you ask, is there a question after all of this ??
Given what I am trying to do, does anyone have a suggestion for a better way to do it?
Many of these applications have "first time run" information files that are accessed the first time a particular application is run against a target Word file. This information is pulled from xls spreadsheets and the application creates DocumentProperties in the target file. From that point forward, the xls spreadsheet data is not used again with that file. Because this is a one time event, using xls spreadsheets works well and the extra 10 to 20 seconds it takes to create the xls object, etc., is no big deal.
During the conversion process from Office2k to Office03, I have been rethinking how things are done and there are several cases where the xls spreadsheet model is not very efficient. Applications that can be run on any Word file and no doc props are created is a good example. In some of these applications, an xls spreadsheet is accessed the first time the application is run and data is stored in global variables. If Word is shut down and started later, the process is repeated. In the interest of efficiency I played around with "pseudo spreadsheets" to see if I could speed this up. I created a Word file with a half dozen bookmarked tables and stored it in the STARTUP folder. Rather than accessing an xls file, the applications access the word tables file. This is noticeably faster for small tables. For several applications where the amount of data is sucked from a 3 col by 10 row table, there is no perceptable delay.
So, you ask, is there a question after all of this ??
Given what I am trying to do, does anyone have a suggestion for a better way to do it?