Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Accessing named constants in Word and Excel
Message
 
 
To
28/08/2000 03:27:13
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00409541
Message ID:
00409728
Views:
13
>FYI - one of the useful recommendations regarding these headers is to avoid including all of the defined constants from a particular app in a header file. Apparently, doing so can have an ill effect on the time it takes to save a form that includes such a file.

This is SO TRUE!!! I once did an app that required Automating Word, Excel, and PowerPoint from one form. It was working fine, but I didn't like having to define all those constants each time I added a new feature. So I decided that I'd add ALL the constants for each app in its own header file, then #INCLUDE all the .H's. Time to save went from "normal" to *over 1 minute* for the form. Of course, machines are faster today, and Tamar did some timing for our Automation book and found that the complete Word header costs about 5 seconds when saving a *blank* form (no replacements to make!). Hence our advice: keep a master copy to cut and paste the pertinent parts into a working copy.

>If I eventually compile the form into an .exe version of my app, do I still suffer a time penalty when the form is loaded via the app

You are right...there is no speed penalty in the EXE. Only when saving it. Of course, you might say there *is* a speed penalty in the EXE -- in that the developer gets tired of taking 15 seconds to save, so the developer never optimizes the application <g>!

- della Martin
Previous
Reply
Map
View

Click here to load this message in the networking platform