Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Instantiating Outlook through VFP 6.0
Message
 
À
09/05/2000 18:24:08
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00367348
Message ID:
00368039
Vues:
29
>Question: this code continues to open a new Outlook. If I'm sending several emails, then I end up with several versions of Outlook open. I know I can close the the session...just check to see if there is a way to open the current session.
>
>Thanks.
>

Trish,

I don't know if this should be a concern or not. First, however, you can find out if Outlook is already running, check out my "Is a Windows application running?" (Is_Run32()) entry in the files section under Win32 and other APIs. It'll return the window handle of a program based on the known portion of the title bar.

Why this might not be a concern? In at least Excel and Word in Office 2000, they produce a new window for each new document opened. I've speculated that GETOBJECT() might not be appropriate here, and to just use CREATEOBJECT(). Further, there's a nasty little problem with Excel and VFP. If you iterate through a range object for each of the cells in it, a reference to Excel is left behind and can only be removed by either shutting VFP down or issuing CLEAR ALL. Neither is a good solution. Since the reference still exists, so does a window and Is_Run32() will indicate that the it is indeed running. Some pretty strange (visually) results occur if you then use GETOBJECT() to get a reference.

Outlook 2000 performs in much the same manner as Word and Excel. A new window is created for text editing or reading.
George

Ubi caritas et amor, deus ibi est
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform