处理临时Word文档

时间:2017-08-18 11:06:27

标签: c# ms-word temporary-files save-dialog

我的应用创建临时文档并按如下方式打开它们:

string tmpPath = System.IO.Path.GetTempFileName().Replace(".tmp", ".docx");
SaveDocument(tmpPath); // saves some in-memory to the tmp path so I can open it using StartProcess
StartProcess(tmpPath);

现在,当用户修改文档并离开Word时,他们会询问是否要保存更改 - 这会将更改写入tmpPath

有没有办法告诉word这是一个新文档,以便保存对话框打开保存对话框而不是覆盖临时文件?

0 个答案:

没有答案
相关问题