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 SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Active-x / VB launching 1

Status
Not open for further replies.

ChrisBelzona

Programmer
Oct 25, 2000
137
0
0
GB
Dear all,

I have a scenario where I require Adobe Acrobat to be launched from a web browser. This has to be done independantly of the browser, and not use the browser plug in requirements as a pdf would do normally. If required, then I will have a submit button, but fundamentally, I need the Acrobat reader to be launched from the web browser, but not in the browser.

I have tried through many means, but have not successfully done so. The browser in question is Internet Explorer. This will not be violating security issues, as the whole thing will run off a CD.

Any help through the Active-x components or VB would be mostly appreciated

Thank you

 
Hi,

Try with an hta (HTML application). Here is something to get you started, just edit the path to the application you want to launch.

app_launcher.hta

<html>
<head>
<title>Start Adobe Reader</title>
<HTA:APPLICATION ID=&quot;start_adobe&quot;
APPLICATIONNAME=&quot;Start Adobe Reader&quot;
BORDER=&quot;thin&quot;
BORDERSTYLE=&quot;normal&quot;
CAPTION=&quot;yes&quot;
ICON=&quot;&quot;
MAXIMIZEBUTTON=&quot;yes&quot;
MINIMIZEBUTTON=&quot;yes&quot;
SHOWINTASKBAR=&quot;yes&quot;
SINGLEINSTANCE=&quot;no&quot;
SYSMENU=&quot;yes&quot;
VERSION=&quot;1.0&quot;
/>
</head>
<body>
<span id=&quot;BtnHello&quot; style=&quot;color:blue;font-family:monospace;font-size:8pt;&quot; onMouseOver=&quot;document.all.BtnHello.style.cursor='hand';document.all.BtnHello.style.color='red';&quot; onMouseOut=&quot;document.all.BtnHello.style.cursor='';document.all.BtnHello.style.color='blue';&quot;>Start Adobe Reader</span>
<script type=&quot;text/vbscript&quot;>
Sub BtnHello_OnClick
set objShell = CreateObject( &quot;WScript.Shell&quot; )
lngReturn = objShell.Run (&quot;Acrobat.exe&quot;, 1, 1)
set objShell = Nothing
End Sub
</script>
</body>
</html>


Bye.
 
Thank you for the tip, It solved a few issues I have been having.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top