?
Solved

launch ms-word document in browser

Posted on 2001-07-23
10
Medium Priority
?
505 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
  • 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
VIDEO: THE CONCERTO CLOUD FOR HEALTHCARE

Modern healthcare requires a modern cloud. View this brief video to understand how the Concerto Cloud for Healthcare can help your organization.

 
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 40 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

Industry Leaders: We Want Your Opinion!

We value your feedback.

Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!

Question has a verified solution.

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

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…
I would like to start this tip/trick by saying Thank You, to all who said that this could not be done, as it forced me to make sure that it could be accomplished. :) To start, I want to make sure everyone understands the importance of utilizing p…
this video summaries big data hadoop online training demo (http://onlineitguru.com/big-data-hadoop-online-training-placement.html) , and covers basics in big data hadoop .
This lesson discusses how to use a Mainform + Subforms in Microsoft Access to find and enter data for payments on orders. The sample data comes from a custom shop that builds and sells movable storage structures that are delivered to your property. …
Suggested Courses

840 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