📎 AI Summary:
The original poster asked how to open a specific URL in a new tab of Microsoft Edge, providing a script that works with Internet Explorer. A responder suggested a simple one-line command using PowerShell or a batch file to open the URL in Edge. The thread concludes with the original poster expressing thanks for the helpful advice.

Slash23

New Member
Member details
Joined
May 12, 2019
Messages
2
Thread Author #1
Hi, I want to open a specific .url in a new tab of Microsoft Edge, this is the file I used for Explorer, can anyone convert for Edge?

thanks


Const OpenInNewTab = &H0800
Const OpenInBackgroundTab = &H1000

Site = "https:\\www.google.com"

Dim oIE
Dim objShell
Dim objWindows

Set objShell = CreateObject("Shell.Application")

For Each objWindows In objShell.Windows
If LCase(Right(objWindows.FullName, 12)) = "iexplore.exe" Then
Set oIE = objWindows
Exit For
End If
Next

If TypeName(oIE) = "Nothing" Or TypeName(oIE) = "Empty" Then
Set oIE = CreateObject("InternetExplorer.Application")
oIE.Visible = True
oIE.Navigate2 Site
Else
oIE.Visible = True
oIE.Navigate2 Site,OpenInBackgroundTab
End If

Set oIE = Nothing
Set objShell = Nothing
Set objWindows = Nothing
WScript.Quit
 

Neemobeer

Windows Forum Team
Staff member
Member details
Joined
Jul 4, 2015
Messages
8,995
As a batch file or Powershell it would be one line.

Code:
Start microsoft-edge:https://google.com
 

Solution