Link to home
Start Free TrialLog in
Avatar of Fontographer
Fontographer

asked on

Open a URL with Internet Explorer in a new tab (not a new window)

I am trying to get an already running instance of Internet Explorer to add a new tabbed page. This is the Delphi code I start with.:

var
  Temp : String;
begin
  if FileExists('C:\Program Files (x86)\Internet Explorer\iexplore.exe') then begin
    Temp := '"C:\Program Files (x86)\Internet Explorer\iexplore.exe"';
  end;
  if FileExists('C:\Program Files\Internet Explorer\iexplore.exe') then begin
    Temp := '"C:\Program Files\Internet Explorer\iexplore.exe"';
  end;
  ShellExecute(Handle, 'open', PChar(Temp), PChar('http://google.com'), nil, SW_SHOW);
end;

Open in new window


Although this code does display the URL (http://google.com) in IE, it does so by launching a new instance (new window) of IE rather than in a new tabbed page to the already running instance of IE.  How can I do the latter?
ASKER CERTIFIED SOLUTION
Avatar of Sinisa Vuk
Sinisa Vuk
Flag of Croatia image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial