Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Where is Outlook?
Message
 
À
31/10/2001 14:22:50
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
COM/DCOM et OLE Automation
Divers
Thread ID:
00575801
Message ID:
00576105
Vues:
21
>How can I determine where Outlook is installed on a user's machine? Can it be determined from a property of the Outlook Application object?

Elyse,

Using the Registry class that's in the FFC folder beneath the main VFP folder, try something like this
LOCAL lcserver, lcCLSID, oReg, lcfilename
lcserver = "Outlook.Application"
lcCLSID = ""
lcfilename = ""
SET CLASSLIB TO REGISTRY ADDITIVE
oReg = CREATEOBJECT("Registry")
IF oReg.IsKey(lcserver)
  IF oReg.OpenKey(lcserver + "\CLSID") = 0
    IF oReg.GetKeyValue("", @lcCLSID) = 0
      oReg.CloseKey()
      IF oReg.OpenKey("CLSID\" + lcCLSID + "\LocalServer32") = 0
        IF oReg.GetKeyValue("", @lcfilename) = 0
          ? lcfilename
        ELSE
          ? "No default value specified"
        ENDIF
      ELSE
        ? "Unable to open server path key"
      ENDIF
    ELSE
      ? "Unable to retrieve CLSID"
    ENDIF
    oReg.CloseKey()
  ELSE
   ? "Unable to open CLSID key"
  ENDIF
ELSE
  ? "Outlook.Application not installed"
ENDIF
RELEASE CLASSLIB REGISTRY
hth,
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