I am writing a Windows Explorer extension that opens an existing .docx file, edits a few things, and saves it to a different path and name. It successfully opens the file, but when it hits the
document.SaveAs() command it just opens the Save As dialog with the original filename and path, rather than saving to the new path.
Here is the code section that handles the doc.
var application = new Microsoft.Office.Interop.Word.Application(); application.Visible = true; var document = application.Documents.Open( FileName: reviewRecordTemplatePath, AddToRecentFiles: false, Visible: true); // Do stuff... document.SaveAs(FileName: reviewRecordPath);