Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

I am almost there... how to launch an application?

Status
Not open for further replies.

Ayac

Programmer
Nov 10, 2000
141
HU
Here is my program. It works just fine, creates an icon on your desktop that launches IE when I click on it. My problem is how to tell to oShellLink.TargetPath to go to a certain website ( If I put it in the website's URL, IE goes there but it uses one of the existing ones. I want to open a new browser with the URL each time they click on the icon. Do you know how can I do that?


Sub CreateIcon()
Dim WshShell, oShellLink
set WshShell = CreateObject("WScript.Shell")
strDesktop = WshShell.SpecialFolders("Desktop")
set oShellLink = WshShell.CreateShortcut(strDesktop & "\Timesheet Pro.lnk")
oShellLink.TargetPath = "Program Files\Internet Explorer\IEXPLORE.EXE"
oShellLink.WindowStyle = 1
oShellLink.Hotkey = "CTRL+SHIFT+Y"
oShellLink.IconLocation = "V:\timesheets.exe, 0"
oShellLink.Description = "Timesheet Pro"
oShellLink.WorkingDirectory = strDesktop
oShellLink.Save
End Sub
 
I think this is a function of your IE settings. I think in the options -> Advanced Tab, there is a checkbox for something like 'Reuse windows for shortcuts' or some such. Try turning that off.

[red]"... isn't sanity really just a one trick pony anyway?! I mean, all you get is one trick, rational thinking, but when you are good and crazy, oooh, oooh, oooh, the sky is the limit!" - The Tick[/red]
 
I think this might help. You could create a short cut to a script that opens the website.

Code:
set objExp = CreateObject("InternetExplorer.Application")
objExp.Navigate "[URL unfurl="true"]http://www.timesheet.com/"[/URL]
objExp.Visible = 1
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top