Results 1 to 3 of 3
  1. #1
    4 Star Lounger
    Join Date
    Jan 2001
    Location
    Houston, Texas, USA
    Posts
    432
    Thanks
    0
    Thanked 0 Times in 0 Posts

    I have 20 people that use Term (Outlook 98, Excel 97)

    I have 20 people that use Termination.xls, the spreadsheet is locationed on
    the network: tabssprod....termination.xls. If they have MSOffice-Excel97
    in the C: drive it works fine. My problem is that when they have Excel in
    the D: drive it doesn't work. How can I get it to check c: and d: for excel?

    I use MS Outlook98 for a form. There is a command button on there that we
    use to start Excel Sub

    cmdExcel_click()
    Set objWSHShell = CreateObject("WScript.Shell")
    objWSHShell.Run("excel.exe tabsprodsecurityTermination.xls")
    end sub

  2. #2
    Gold Lounger
    Join Date
    Dec 2000
    Location
    Hollywood (sorta), California, USA
    Posts
    2,759
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: I have 20 people that use Term (Outlook 98, Excel 97)

    You could try to make use of a call to this nifty API function:

    Public Declare Function FindExecutable Lib "shell32.dll" Alias "FindExecutableA" (ByVal lpFile As String, _
    ByVal lpDirectory As String, ByVal sResult As String) As Long

    Pass it the filename and you should get the full path to the installed executable.
    Kevin <IMG SRC=http://www.wopr.com/w3tuserpics/Kevin_sig.gif alt="Keep the change, ya filthy animal...">
    <img src=/w3timages/blackline.gif width=33% height=2><img src=/w3timages/redline.gif width=33% height=2><img src=/w3timages/blackline.gif width=33% height=2>

  3. #3
    2 Star Lounger
    Join Date
    Mar 2001
    Location
    Oregon, USA
    Posts
    129
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: I have 20 people that use Term (Outlook 98, Excel 97)

    Hi Daniel,

    You might want to grab the install root value from the registry and append it to your shell string. For Office 97, I believe it's HKEY_Local_MachineSoftwareMicrosoftOffice8.0Common InstallRoot.

    HTH,

    Chris

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •