none
programmatically change "save as" location for generated word file RRS feed

  • Question

  • hi,

    i generate a word file with the openxml sdk and open it (from a memory stream). if the user modifies and closes (and saves) the document, the default save location is "My Documents".

    I want to change the default path to a document library in sharepoint. I haven't found any information about that.

    Any hints?

    Tuesday, July 23, 2013 4:21 PM

Answers

  • There's nothing in Word or its file format that will let you set a default save location. That's controlled by the local Word configuration, only.

    It would require you to have an Add-in of some kind running in the Word application. Then you could save some kind of information in the document that an event (DocumentBeforeSave, most likely) could look up and use.


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, July 23, 2013 6:30 PM
    Moderator

All replies

  • There's nothing in Word or its file format that will let you set a default save location. That's controlled by the local Word configuration, only.

    It would require you to have an Add-in of some kind running in the Word application. Then you could save some kind of information in the document that an event (DocumentBeforeSave, most likely) could look up and use.


    Cindy Meister, VSTO/Word MVP, my blog

    Tuesday, July 23, 2013 6:30 PM
    Moderator
  • okay. is there a way to set it in sharepoint? because if I create a new document in a normal document library, word opens, i change something and if close the document, the default save as location is the document library. maybe there is an activeX control that i can be used?
    Wednesday, July 24, 2013 8:25 AM
  • I haven't a clue; you'd need to ask that in a forum that supports SharePoint.

    Cindy Meister, VSTO/Word MVP, my blog

    Wednesday, July 24, 2013 1:05 PM
    Moderator