Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Where is Outlook?
Message
 
To
31/10/2001 14:22:50
Elyse Pomerantz
Dynamic Data Concepts, Inc.
Brooklyn, New York, United States
General information
Forum:
Visual FoxPro
Category:
COM/DCOM and OLE Automation
Miscellaneous
Thread ID:
00575801
Message ID:
00576105
Views:
19
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform