Results 1 to 2 of 2

Thread: Calling an Exe from VBS

  1. #1

    Thread Starter
    Junior Member
    Join Date
    Jan 2001
    Posts
    25

    Question

    I have an exe which I devolped in VB6 for Outlook 2000 which performs a variety of tasks. I would idealy like to to place a button on a contact form in outlook. When this button is pressed it should call the exe (through VBS). I've tried to use the Shell boject to call the exe but when I enter the line:
    Set temp=CreateObject("Shell.Application")

    and receive the error:
    "ActiveX Component cannot create component : Shell.App ..."

    Because of this I'm not sure if this question has to deal mostly with ActiveX or VBS. Any tips or ideas to help me towards my goal?

  2. #2
    New Member
    Join Date
    Jan 2001
    Location
    Brussels (Belgium)
    Posts
    7
    Here the code you need:

    Dim WSHShell
    Set WSHShell = WScript.CreateObject("WScript.Shell")
    WshShell.Run("yourfile.exe")



    Regards
    _________________________________
    JIEF

Posting Permissions

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



Click Here to Expand Forum to Full Width