473,233 Members | 1,862 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,233 software developers and data experts.

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 3954
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 thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

2
by: Richard | last post by:
Good morning all I need a way in visual basic 6, to start a console process, like ping -A xxx.xxx.xxx.xxx > outputfile.txt and make vb hold its own execution till this process finishes....
6
by: Ernesto | last post by:
Does anyone know how to start Python program(s) from a Linux shell script? Is it just $python myscript.py ?? Thanks,
4
by: Danny | last post by:
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...
6
by: JerryP | last post by:
Hello, is there a way to launch the property dialogue for a directory from my c# app ? I would also like to launch the User Account Properties from Active Directory Users and Computers, and the...
2
by: Rustam Asgarov | last post by:
Hi. There was a thread about launching ie from windows form. people suggested using System.Diagnostics.Process.Start(); But how can i do the same from compact framework. I have to lauch IE on...
24
by: Alan M Dunsmuir | last post by:
What is the command (in Windows Forms VB.NET) which will cause the subject computer's default browser to launch, and display a specified Web page? -- Alan M Dunsmuir
1
by: Water Cooler v2 | last post by:
I have a Windows Service I am writing in C# and a set of, let us say three, other executables written in C# (mostly console applications). I want that the Windows Service must do so every few...
10
by: Andrew Neiderer | last post by:
I think I am asking the right newsgroup. If not maybe someone could tell me where to ask this "beginner" question. I want to click on an image (.jpg) that launches a Microsoft window (cmd.exe...
5
by: Oriane | last post by:
Hi there, I would like to run a javascript file directly from the desktop, like a VBScript file. So my post is perhaps "out of topic" in which case I apologize. The goal is to run this sort...
5
by: Stef Mientki | last post by:
hello, I'm not familiar with Linux / Ubuntu, still trying to get my application working under these operating systems. I've a script "file_support.py", now when I'm in Ubuntu, open a command...
3
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 3 Jan 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). For other local times, please check World Time Buddy In...
0
by: jianzs | last post by:
Introduction Cloud-native applications are conventionally identified as those designed and nurtured on cloud infrastructure. Such applications, rooted in cloud technologies, skillfully benefit from...
0
by: abbasky | last post by:
### Vandf component communication method one: data sharing ​ Vandf components can achieve data exchange through data sharing, state sharing, events, and other methods. Vandf's data exchange method...
0
by: fareedcanada | last post by:
Hello I am trying to split number on their count. suppose i have 121314151617 (12cnt) then number should be split like 12,13,14,15,16,17 and if 11314151617 (11cnt) then should be split like...
0
by: stefan129 | last post by:
Hey forum members, I'm exploring options for SSL certificates for multiple domains. Has anyone had experience with multi-domain SSL certificates? Any recommendations on reliable providers or specific...
0
by: DolphinDB | last post by:
Tired of spending countless mintues downsampling your data? Look no further! In this article, you’ll learn how to efficiently downsample 6.48 billion high-frequency records to 61 million...
0
by: Aftab Ahmad | last post by:
Hello Experts! I have written a code in MS Access for a cmd called "WhatsApp Message" to open WhatsApp using that very code but the problem is that it gives a popup message everytime I clicked on...
0
by: Aftab Ahmad | last post by:
So, I have written a code for a cmd called "Send WhatsApp Message" to open and send WhatsApp messaage. The code is given below. Dim IE As Object Set IE =...
0
isladogs
by: isladogs | last post by:
The next Access Europe meeting will be on Wednesday 6 Mar 2024 starting at 18:00 UK time (6PM UTC) and finishing at about 19:15 (7.15PM). In this month's session, we are pleased to welcome back...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.