locked
Open word on client side from asp.net page RRS feed

  • Question

  • User114438631 posted

    Hello,

    Is there a way to open a word document in Microsoft Word directly from from an ASP.NET webpage without having the save/open dialog pop up?


    To be more clear, Here is how I want my app to work. The user clicks on a link. The word file is copied from the web server to local computer and opens the document in MS word.


    Thanks,


    Yoel


    Wednesday, July 7, 2010 10:33 AM

Answers

  • User1759999623 posted

    The problem with using a network share is that the browser will likely not have any means of connecting to it.  Remember that the browser itself is a client-based application that you may be able to manipulate if you have some control of the user's computer.  Besides all of the security issues associated with these, this is unlikely in Internet-based web application.

    Overall, you need to disassociate the Internet from your network when thinking about how it works.  A web-based cannot operate like an operating system because it has to be independent of the OS so that any user can access your web application from any operating systems, not just Windows.  As such, you would need to program for all variations associated with Windows, Linux, etc.

    Now, granted, you have an intranet application and you have a little more control over it.  Still, you have issues with being able to use network shares from your web application, which typically will use an anonymous login user which will unlikely have any access beyond the web application's computer.

    So, why does it have to be a Word document?  Can it be something else? 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 20, 2010 10:19 PM

All replies

  • User1759999623 posted

    You will need to have direct access to the client's computer to copy a file directly to a specific location as well as open Word from the client.  Since you are using a web application, this is not very practical nor secure.

    Wednesday, July 7, 2010 11:07 AM
  • User114438631 posted

    How about using an ActiveX or Silverlight component?

    Wednesday, July 7, 2010 12:26 PM
  • User1759999623 posted

    Unless you have full control on the client's computer, you cannot access the file directly.  This is why you get a file dialog because a web page does know the layout of your computer files.  Additionally, even if you had limited access, you could be guarantee that the files would be in the same exact location from client machine to client machine.

    So, what exactly are you wanting to do with this?  Maybe we can come up with another solution that resolve your issue. 

    Wednesday, July 7, 2010 4:58 PM
  • User1006065563 posted

    I am trying to do something similar.  I have been unsucessful in finding a solution to this as well.  I am actually storing the word document in SQL Server.  When the user clicks a button I am "streaming it to their “PC" (would rather it be network shared drive).  Once they do their editing and saving I want to grab the edited/saved document from the network shared drive and have the ASP page save it back to SQL Server.  You had mentioned that you could not guarantee where it would be located on the client machine.  Is there any way to manipulate the browser and tell it where you want word to open the document once it streamed?  As mentioned, I would actually like to save it to a network shared drive that both that currently the client and server have access to.  This is an Intranet implementation and is behind a firewall. 

    Tuesday, July 20, 2010 9:04 PM
  • User1759999623 posted

    The problem with using a network share is that the browser will likely not have any means of connecting to it.  Remember that the browser itself is a client-based application that you may be able to manipulate if you have some control of the user's computer.  Besides all of the security issues associated with these, this is unlikely in Internet-based web application.

    Overall, you need to disassociate the Internet from your network when thinking about how it works.  A web-based cannot operate like an operating system because it has to be independent of the OS so that any user can access your web application from any operating systems, not just Windows.  As such, you would need to program for all variations associated with Windows, Linux, etc.

    Now, granted, you have an intranet application and you have a little more control over it.  Still, you have issues with being able to use network shares from your web application, which typically will use an anonymous login user which will unlikely have any access beyond the web application's computer.

    So, why does it have to be a Word document?  Can it be something else? 

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Tuesday, July 20, 2010 10:19 PM