Forum Discussion

krishnapuli's avatar
krishnapuli
Occasional Contributor
7 years ago

Vb Script Getobject method is not binding to an already open Outlook application

Hello Every One,

 

My requirement is to open outlook with Run as Admin option.After That i am trying to bind outlook with GetObject vb script method.But its not working on outlook though its perfectly binding with excel, word etc.

 

Any help in this regard.

2 Replies

    • krishnapuli's avatar
      krishnapuli
      Occasional Contributor

      Hi,

       

      I have red the provided article and came to know that getobject function does not bind to the existing excel application.

       

      I don't know the exact internals of how COM works but Getobject can get the existing excel reference.

       

      Following steps works in VB script.

      Set Obj=CreateObject("Excel.Application") will give  new excel instance.

      Set Obj=GetObject(,"Excel.Application") will give existing excel instance.I.e Open excel application and run this statement.This statement binds to the opened excel application.