Opening URLs from MS Access; force to open in new browser window? (1 Viewer)

TheDougmeister

New member
Local time
Today, 01:28
Joined
Oct 15, 2021
Messages
4
I know that I can use the "Shell" command to open a URL:

Shell <Browser path and EXE> & " " & <URL>

But it will open in a new tab if the browser already has instantiated an instance. Is there a way to force it to open in a new browser window? Perhaps with a different method, or with different parameters?

Note: these are cross-posted at two other forums where I received no solid answers but plenty of complaints about not labelling my post as a "crosspost", so I'm doing that here.
 

NauticalGent

Ignore List Poster Boy
Local time
Today, 01:28
Joined
Apr 27, 2015
Messages
6,321
Note: these are cross-posted at two other forums where I received no solid answers but plenty of complaints about not labelling my post as a "crosspost", so I'm doing that here.
Yes, that does ruffle some feathers! Can you provide the links to the cross posts so that we can see what has been offered so far?
 

Gasman

Enthusiastic Amateur
Local time
Today, 06:28
Joined
Sep 21, 2011
Messages
14,238
What browser are you using?
I use Chrome, I also have Google access on my PC ?

So after just one Google search I found https://superuser.com/questions/731...n-to-open-chrome-in-new-window-and-move-focus

and from that I created
Code:
Sub testChromeNewWindow()
Dim strUrl As String, strBrowserPath As String, strNewWindow As String

strUrl = "www.bbc.co.uk"
strBrowserPath = "C:\Program Files\Google\Chrome\Application\Chrome.exe "
strNewWindow = "/new-window "

Shell strBrowserPath & strNewWindow & strUrl

End Sub

Perhaps there are similar options for other browsers? :unsure:
If not, just use Chrome?
 

TheDougmeister

New member
Local time
Today, 01:28
Joined
Oct 15, 2021
Messages
4
What browser are you using?
I use Chrome, I also have Google access on my PC ?

So after just one Google search I found...
.
.
.
Perhaps there are similar options for other browsers? :unsure:
If not, just use Chrome?
Thank you, @Gasman! I am actually using "Brave", but the same command-line parameter worked like a charm. You picked exactly the right search terms I guess! I was getting frustrated by my Google search; using the wrong terms I suppose.

@NauticalGent, thank you (and everyone else) for your responses and humor. I appreciate the help and the friendliness.
 

Users who are viewing this thread

Top Bottom