0

I have an application which creates and opens a document in Word. The user can modify the document and then save it again, but I don't want the user to be prompted via Word to save it in the location from which it was loaded - I want to set the path to which the document should be saved (if any) to another path.

I'm not using automation to show a Save as dialog - it's the Word "Save" button that will be pressed, and so I want to set some sort of global default "saves as" location.

Peter
  • 1,292
  • 4
  • 15
  • 33

1 Answers1

2

In the end, quite simple but not very good naming on Microsoft's part (but let's be forgiving, they have a huge object there). Anyway, here's the code (where Application is the Word Application object defined in the Microsoft.Office.Interop.Word PIA):

Application.ChangeFileOpenDirectory("C:\\SampleFor\\StackOverflow");
Peter
  • 1,292
  • 4
  • 15
  • 33