locked
Opening a MS Word File and setting the save location RRS feed

  • Question

  • User623541716 posted

    Hi,

    I have an ASP intranet site which opens word documents from a shared network drive (link is stored in a DB).  When the user then goes to save the document, it points the user to their default location - say C:\myprofile\my documents.  How can i get it so that the user can just click on save and it saves it in the location it got the file from?  I am using the following code to grab the document:

    Response.AddHeader("Content-disposition", "attachment; filename=" & docfilename)
    Response.ContentType = "application/vnd.ms-word"
    Response.BinaryWrite(fileData)
    Response.[End]()

    If i navigate through the network share manually through windows, open the document and click save - it will save it to the right location.

    Thanks

    Monday, September 20, 2010 12:20 PM

Answers

  • User792330548 posted

    Hi,

    As you are writing as binary into the browser the location of the file is lost.
    And even though you could customize the default save location from MS 2007 onwards, you have to set for each user.
    And if the location of the file changes then the problem will re-appear.

    Though I dont have complete understanding, I think if you could set the source file location, then that might work.

    • Marked as answer by Anonymous Thursday, October 7, 2021 12:00 AM
    Wednesday, September 22, 2010 1:44 AM