473,406 Members | 2,710 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,406 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 3966
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...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

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.