Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Stupid Outlook tricks (Tip of the Day)
Message
De
27/02/2000 22:23:41
 
 
À
Tous
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Titre:
Stupid Outlook tricks (Tip of the Day)
Divers
Thread ID:
00338267
Message ID:
00338267
Vues:
58
Hi All,

Want to see something neat? Outlook supports automating it's Inspectors and Explorers. While these objects leave a lot to be desired in terms of PEMs, it can still save you the trouble of storing addresses and email in VFP tables when you can make Outlook do that work.

To see an Inspector form for a Contact:
oOL=CREATEOBJECT("Outlook.Application")
oNS=oOL.GetNameSpace("MAPI")
oCF=oNS.GetDefaultFolder(10)  && Default ContactItems
oItem=oCF.Items.Find('[FullName]="Hank Aaron"')
IF !ISNULL(oItem)
   oItem.GetInspector
   oItem.Display  && Activate also works
ENDIF
If you close the Inspector form via the Close box, you will have to recreate oItem to open another one.
To see an Explorer form for all default ContactItems:
oOL=CREATEOBJECT("Outlook.Application")
oNS=oOL.GetNameSpace("MAPI")
oCF=oNS.GetDefaultFolder(10)  && Default ContactItems
oCF.GetExplorer
oCF.Display && Activate works here as well
If you close the Explorer via the Close box, you will have to recreate the oCF item.

Neat, huh?
------------------------------------------------
John Koziol, ex-MVP, ex-MS, ex-FoxTeam. Just call me "X"
"When the going gets weird, the weird turn pro" - Hunter Thompson (Gonzo) RIP 2/19/05
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform