Solved

launch ms-word document in browser

Posted on 2001-07-23
10
496 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
Free Tool: Port Scanner

Check which ports are open to the outside world. Helps make sure that your firewall rules are working as intended.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

 
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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Suggested Solutions

Title # Comments Views Activity
Live mode in DW, need to creae Session 4 106
Select distinct 25 115
Error viewing ASP page 12 173
Select only the top record in a left join 13 45
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 …
Microsoft Active Directory, the widely used IT infrastructure, is known for its high risk of credential theft. The best way to test your Active Directory’s vulnerabilities to pass-the-ticket, pass-the-hash, privilege escalation, and malware attacks …
Two types of users will appreciate AOMEI Backupper Pro: 1 - Those with PCIe drives (and haven't found cloning software that works on them). 2 - Those who want a fast clone of their boot drive (no re-boots needed) and it can clone your drive wh…

808 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