Win a copy of Rust Web Development this week in the Other Languages forum!
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Tim Cooke
  • Campbell Ritchie
  • Ron McLeod
  • Liutauras Vilda
  • Jeanne Boyarsky
Sheriffs:
  • Junilu Lacar
  • Rob Spoor
  • Paul Clapham
Saloon Keepers:
  • Tim Holloway
  • Tim Moores
  • Jesse Silverman
  • Stephan van Hulst
  • Carey Brown
Bartenders:
  • Al Hobbs
  • Piet Souris
  • Frits Walraven

Opening Word

 
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I am creating a table of contents with html to a link of word document's but i want the link to open them up with word not a browser displaying them in word.
 
author
Posts: 15385
6
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
You can not force it since it is the way the user has their browser set up.

Eric
 
r phipps
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
This is on an intanet, i thought there might be some way with java script to open word and pass it the file name to open with?
 
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Browser will search for that appropriate application, if found then it will open the document otherwise you will get a save file window.

It will open inside the browser if there's a registered plugin for it.
You have no control over that.
 
Senthil B Kumar
Ranch Hand
Posts: 160
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
if a website could launch applications at will on a client computer it could install any software it wanted on that computer. The consequences would be disastrous. No one would be able to visit any website as doing so would leave them wide open to virusses, spyware, and a host of other baddies.
 
r phipps
Ranch Hand
Posts: 60
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I get the following to work when it is coded on my c drive but not off of the network drive.

<HTML>
<HEAD>
<SCRIPT LANGUAGE=VBScript>
Dim objWord
Sub Btn1_onclick()
call OpenDoc("http://www.cuhumane.org/CARE/cats101.doc")
End Sub

Sub OpenDoc(strLocation)

Set objWord = CreateObject("Word.Application")
objWord.Visible = true
objWord.Documents.Open strLocation
End Sub

</SCRIPT>
<TITLE>Launch Word</Title>
</HEAD>
<BODY>
<INPUT TYPE=BUTTON NAME=Btn1 VALUE="Open Word Doc">
<p>
</BODY>
</HTML>
 
You showed up just in time for the waffles! And this tiny ad:
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop
https://coderanch.com/wiki/718759/books/Building-World-Backyard-Paul-Wheaton
reply
    Bookmark Topic Watch Topic
  • New Topic