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!

Open MS office documents in Office not the browser

Status
Not open for further replies.

simonWMC2

Programmer
Aug 5, 2004
161
GB
Hi guys...

I have buit a web page that needs to link to a number of word, excel, powerpoint and access files. I want the links to open the files in the full applications rather than the web browser (ie6).

I have tried

Code:
<script language="JavaScript">
  function startWord(strFile)
  {
    var myApp = new ActiveXObject("Word.Application");
    if (myApp != null)
    {
      myApp.Visible = true;
      myApp.Documents.Open(strFile);
    }
  }
</script>

But can't get it to work.
I am using DW8 and Office 2003.
Any ideas ?

Thanks

Simon
 
You cannot do anything about this. Each user has to change their OS settings.


Otherwise this would be a huge potential security risk.

Darryn Cooke
| The New Orange County Graphic designer and Marketing and Advertising Consultant
| Marketing and Advertising blog
 
Put them in zip files to force the download?

[Peace][Pipe]
 
or if you had server side scripting such as PHP you could use the header(); to send the file download

Regards,

Martin

Computing Design And Services:
 
Thanks guys....

The only way i managed to get around it in the end was to instruct the users to use the shortcut menu to download the file.

Thanks Tek-Tippers :)
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top