Solved

launch ms-word document in browser

Posted on 2001-07-23
10
490 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
 
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
Free Trending Threat Insights Every Day

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
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

IT, Stop Being Called Into Every Meeting

Highfive is so simple that setting up every meeting room takes just minutes and every employee will be able to start or join a call from any room with ease. Never be called into a meeting just to get it started again. This is how video conferencing should work!

Join & Write a Comment

I recently decide that I needed a way to make my pages scream on the net.   While searching around how I can accomplish this I stumbled across a great article that stated "minimize the server requests." I got to thinking, hey, I use more than one…
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 information …
Sending a Secure fax is easy with eFax Corporate (http://www.enterprise.efax.com). First, Just open a new email message.  In the To field, type your recipient's fax number @efaxsend.com. You can even send a secure international fax — just include t…
This demo shows you how to set up the containerized NetScaler CPX with NetScaler Management and Analytics System in a non-routable Mesos/Marathon environment for use with Micro-Services applications.

743 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

Need Help in Real-Time?

Connect with top rated Experts

9 Experts available now in Live!

Get 1:1 Help Now