469,643 Members | 1,452 Online
Bytes | Developer Community
New Post

Home Posts Topics Members FAQ

Post your question to a community of 469,643 developers. It's quick & easy.

launching IE with shell

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
4 3773
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
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
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
"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.

Similar topics

4 posts views Thread by Danny | last post: by
2 posts views Thread by Rustam Asgarov | last post: by
24 posts views Thread by Alan M Dunsmuir | last post: by
1 post views Thread by Water Cooler v2 | last post: by
10 posts views Thread by Andrew Neiderer | last post: by
5 posts views Thread by Oriane | last post: by
5 posts views Thread by Stef Mientki | last post: by
reply views Thread by gheharukoh7 | last post: by
By using this site, you agree to our Privacy Policy and Terms of Use.