I create word documents via automation and mailmerge with office Interop from c# (.net4). The merge works well and the user receives the created document as he desires. So far all is well. The client now requests, that if he tries to save the generated file (via save file dialog), that the filename of the document is already prefilled.
I already have tried the obvious things such as setting the Name property of the Document-instance and other properties, I also googled for a solution but up to now, I was not able to set the file-name of the word file (without saving it).
Does someone knows a way how to achieve this? I feel that the client would be very happy if it would work, and I also spent already a lot of time on this (I have to admit that word automation is a thing I have not a lot of experience).
File.Move(oldName, newName)
? – JuettaDocument.SaveAs
? – Juetta