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

using http file paths in Acrobat Reader command line

Status
Not open for further replies.

MontyBurns

Programmer
Oct 3, 2001
99
GB
Hi,

I have the following code in an HTML page to open a pdf externally to the browser. I need to do this to enable global searching of the document collection. If I specify a local file on my hard drive, it works perfectly, but if I use Acrobat complains of an Internal Error on trying to open the doc:


<html>
<head>
<title>Testing Opening PDF Docs externally to the Browser</title>
<script language=&quot;vbscript&quot;>
function ExternalPDF(location)
Set WShell = CreateObject(&quot;WScript.Shell&quot;)
WShell.Run &quot;C:\progra~1\adobe\acroba~1\reader\acrord32.exe &quot; & location
End function
</script>
<head>

<body>
<span
style=&quot;color: blue; font-size: 10px; text-decoration: underline; font-
family: verdana; cursor: hand&quot;
onClick=&quot;ExternalPDF('c:\test.pdf')&quot;>
Click here
</span>
</body>
</html>


I realise this is outside the scope of a vbscript list, but hope that someone in the list can help all the same.

Any pointers would be very welcome,
Burns
 
Hello, MontyBurns.

If .pdf is properly associated with acror32.exe already, I think you may as well simply use navigate to it. Hence, simply change the whole function ExternalPDF part to read as follows :

Function ExternalPDF(location)
navigate location
End Function


Maybe I miss some functionality you want to make good use of ?

regards - tsuji
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top