code: public static <T extends Com4jObject> T getObject(Class<T> primaryInterface, String fileName, String progId ) {
          return new GetObjectTask<T>(fileName,progId,primaryInterface).execute();
      }
docs: Returns a reference to a COM object primarily by loading a file.
  
  <p>
  This method implements the semantics of the {@code GetObject} Visual Basic
  function. See <a href="http://msdn2.microsoft.com/en-us/library/e9waz863(VS.71).aspx">MSDN reference</a>
  for its semantics.
  
  <p>
  This function really has three different mode of operation:
  
  <ul>
  <li>
  If both {@code fileName} and {@code progId} are specified,
  a COM object of the given progId is created and its state is loaded
  from the given file name. This is normally used to activate a OLE server
  by loading a file.
  
  <li>
  If just {@code fileName} is specified, it is treated as a moniker.
  The moniker will be bound and the resulting COM object will be returned.
  In a simple case a moniker is a file path, in which case the associated
  application is activated and loads the data. But monikers in OLE are
  extensible, so in more general case the semantics really depends on
  the moniker provider.
  
  <li>
  If just {@code progId} is specified, this method would just work like
  {@link #getActiveObject(Class, String)}.
  
  </ul>
  @param <T> the type of the return value and the type parameter of the class object of primaryInterface
  
  @param primaryInterface The returned COM object is returned as this interface.
  Must be non-null. Passing in {@link Com4jObject} allows
  the caller to create a new instance without knowing
  its primary interface.
  @param fileName path to the file
  @param progId the progID in string representation
  
  @return non-null valid object.
  
  @throws ComException if the retrieval fails.