By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
424,466 Members | 2,171 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 424,466 IT Pros & Developers. It's quick & easy.

launching IE with shell

P: n/a
Hello again
I have two quesitons about launching IE from code in access.

Is there a way to do the shell command to launch IE without having to know
the exact path. shell seems to be picky and will not work without the exact
path.

Is there a way to keep one instance of the IE open when you use this
command? Instead of it having to open each time you run the shell command?
Thanks in advance
Nov 12 '05 #1
Share this Question
Share on Google+
4 Replies


P: n/a
Ben
You could try using this..

Application.FollowHyperlink "http://bbc.co.uk"

or use the api (by pasting at the top of a module)

Declare Function ShellExec Lib "shell32.dll" _
Alias "ShellExecuteA" _
(ByVal hwnd As Long, _
ByVal lpOperation As String, _
ByVal lpFile As String, _
ByVal lpParameters As String, _
ByVal lpDirectory As String, _
ByVal nShowCmd As Long) _
As Long

which will allow you to do the command

shellexec(0,vbNullString,"iexplore","http:\\www.bb c.co.uk",vbNullString,1)

Hope this helps

Ben

Nov 12 '05 #2

P: n/a
Danny wrote:
Hello again
I have two quesitons about launching IE from code in access.

Is there a way to do the shell command to launch IE without having to
know the exact path. shell seems to be picky and will not work
without the exact path.

Is there a way to keep one instance of the IE open when you use this
command? Instead of it having to open each time you run the shell
command?
Thanks in advance


In theory you should be able to find a registry entry that will tell you
the browser application to open (default?)??

or

I have some code somewhere that looks up the default application to open
a particular file extension (eg. .doc will be opened with Word). That
might work for .htm documents if IE is the default file association?
--
regards,

Bradley
Nov 12 '05 #3

P: n/a
Thanks
this helped a lot.
I added the api code to my module

Thanks again

"Bradley" <br*****@REMOVETHIScomcen.com.au> wrote in message
news:40********@nexus.comcen.com.au...
Danny wrote:
Hello again
I have two quesitons about launching IE from code in access.

Is there a way to do the shell command to launch IE without having to
know the exact path. shell seems to be picky and will not work
without the exact path.

Is there a way to keep one instance of the IE open when you use this
command? Instead of it having to open each time you run the shell
command?
Thanks in advance


In theory you should be able to find a registry entry that will tell you
the browser application to open (default?)??

or

I have some code somewhere that looks up the default application to open
a particular file extension (eg. .doc will be opened with Word). That
might work for .htm documents if IE is the default file association?
--
regards,

Bradley

Nov 12 '05 #4

P: n/a
"Danny" <da********@hotmail.com> wrote in
news:8u**********************@news4.srv.hcvlny.cv. net:
I added the api code to my module


Application.FollowHyperlink will use the default browser, and the
only thing you gain by using the ShellExec API declaration is the
flexibility to automatically load other kinds of files with just the
file names. Well, there's one other advantage: ShellExec doesn't
load the useless Web toolbar in Access.

--
David W. Fenton http://www.bway.net/~dfenton
dfenton at bway dot net http://www.bway.net/~dfassoc
Nov 12 '05 #5

This discussion thread is closed

Replies have been disabled for this discussion.