Results 1 to 3 of 3
  1. #1
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    XP Script NG on Vista (Vista)

    Under Windows XP I invoked Cscript.exe passing it the script shown below to deactivate Outlook.
    Dim oAppOL
    set oAppOL = GetObject(, "Outlook.Application")
    oAppOL.Quit
    set oAppOL = Nothing

    It worked fine. Doing the same thing under Vista produces the following error: "Microsoft VBScript runtime error: ActiveX component can't create object: 'GetObject'". I don't know the script language; I copied it from a magazine. Can anyone tell me how to correct whatever is wrong?

    John Littell

  2. #2
    Silver Lounger
    Join Date
    Apr 2001
    Location
    New York, New York, USA
    Posts
    2,328
    Thanks
    0
    Thanked 1 Time in 1 Post

    Re: XP Script NG on Vista (Vista)

    You can't use GetObject function; use CreateObject instead.
    Change the second line in your script like this:

    <font face="Georgia">set oAppOL = CreateObject("Outlook.Application") </font face=georgia>

  3. #3
    3 Star Lounger
    Join Date
    May 2002
    Location
    Florence, Oregon, USA
    Posts
    209
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: XP Script NG on Vista (Vista)

    Changed the statuement as per your instructions.

    Worked perfectly.

    Thank you, John

Posting Permissions

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