Solved

launch ms-word document in browser

Posted on 2001-07-23
10
498 Views
Last Modified: 2009-07-29

my application needs to call an ms-word document and launch it in the browser.  how do i do this using vbscript? tnx
0
Comment
Question by:marr
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
  • 2
  • 2
  • +3
10 Comments
 
LVL 5

Expert Comment

by:nilapenn
ID: 6310904
try this

<script language="vbscript">
window.location.href="yourdocumentnamewithpath"
</script>
0
 
LVL 1

Expert Comment

by:raghurani
ID: 6311126
Hi!

You can invoke ms-word (or any such application) only when there is an associated file already available. I do not think you can invoke any application without having an accociated file.

regards,
Raghu

0
 
LVL 1

Expert Comment

by:anupkarade
ID: 6311160
Of Course you can always open an Ms-Word document in the browser.Check the permissions of the virtual directory
in your IIS

you can call this script on any event
<script language="vbscript">
 window.open "./Test.doc","Wintest"
</script>

<script language="vbscript">
 window.open "Full Path","Wintest"
</script>


                            regards
                                      Anup
0
Creating Instructional Tutorials  

For Any Use & On Any Platform

Contextual Guidance at the moment of need helps your employees/users adopt software o& achieve even the most complex tasks instantly. Boost knowledge retention, software adoption & employee engagement with easy solution.

 
LVL 1

Expert Comment

by:raghurani
ID: 6311176
anup saab,

  window.open "./Test.doc","Wintest" will invoke winword, but, you are invoking winword via an associated file ('test.doc', in this case).

 Can we invoke an application without having an associated file with it ? Say for example, if I wish to invoke winword but I do not want winword to open test.doc....

regards,
Raghu



0
 
LVL 1

Expert Comment

by:anupkarade
ID: 6312049
Hi...
  Addressing to the issue as raised by Mr.Raghu
we can open the word application from asp here is the script
 
            Set WordApp = CreateObject("word.application")
         Set WordDoc = WordApp.Documents.Add()
           
  this can be done on client and server side both
  But ,...
  there are many issues tp be solved before it
 
  AspAllowOutOfProcComponents property is to be set true
  in IIS Metabase as defaultly only Inproc components are
   allowed to be instiantiated....
   
   for more details
   refer
   
   http://support.microsoft.com/support/kb/articles/Q285/1/76.ASP   ---for Creation of word doc


http://www.microsoft.com/technet/treeview/default.asp?url=/TechNet/prodtechnol/iis/deploy/config/metabase.asp ---for setting the AspAllowOutOfProcComponents true


right Raghu sab....??

                        regards
                               Anup
   
 
0
 
LVL 1

Expert Comment

by:raghurani
ID: 6312124
Anup,

went through the article.. liked it.. but failed to implement the code... what could be wrong then..
I have set the IE options (to 'prompt' while initia..)

Here is my try.asp file:
------------------------
<html>
<head>
</head>

<body>
<script language=vbscript>
Set WordApp = CreateObject("word.application")
Set WordDoc = WordApp.Documents.Add()

</script>
</body>
</html>
-------------------------

IE prompts me when I access this page, but fails to run winword...

I am running IE 5.0 on Windows 2000...

regards,
raghu
0
 

Author Comment

by:marr
ID: 6329116

how will i call/open the word document from a hyperlink?  also, do the previous codes also apply to ms excel?
0
 
LVL 5

Accepted Solution

by:
nilapenn earned 10 total points
ID: 6329258
just give the path of your word document in the hyperlink

for example

<a href="yourworddocumentpath">yourlinkname</a>

yes this applies to excel also.
0
 
LVL 33

Expert Comment

by:hongjun
ID: 8623292
No comment has been added lately, so it's time to clean up this TA.
I will leave a recommendation in the Cleanup topic area that this question is:
[points to nilapenn]

Please leave any comments here within the next seven days.

PLEASE DO NOT ACCEPT THIS COMMENT AS AN ANSWER!

hongjun
EE Cleanup Volunteer
0
 

Expert Comment

by:Chmod
ID: 8674365
As recommended

Chmod
Community Support Moderator @Experts Exchange
0

Featured Post

Salesforce Has Never Been Easier

Improve and reinforce salesforce training & adoption using WalkMe's digital adoption platform. Start saving on costly employee training by creating fast intuitive Walk-Thrus for Salesforce. Claim your Free Account Now

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Suggested Solutions

Title # Comments Views Activity
wordpress display sub menu only when click 12 90
IP API - need data... 4 31
Clear input text 15 32
Read text on Table 7 46
I have helped a lot of people on EE with their coding sources and have enjoyed near about every minute of it. Sometimes it can get a little tedious but it is always a challenge and the one thing that I always say is:   The Exchange of informatio…
Have you ever needed to get an ASP script to wait for a while? I have, just to let something else happen. Or in my case, to allow other stuff to happen while I was murdering my MySQL database with an update. The Original Issue This was written…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial

738 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question