英文:
Programatically save Word Documents without dialog or progress popups
问题
我们有一个复杂的MS Word VSTO Add-In,它会自动将文档保存到网络驱动器上。这个保存操作应该完全在后台自动进行,而且要完全透明。在这里,我们不能使用Word内置的自动保存功能,因为它坚持要将东西保存在OneDrive中,这对我们来说不合适。而且我们也不能使用自动恢复,因为它只会保存到本地计算机,而不是网络位置。
对于一些通过VPN工作的用户,保存可能会有点慢,Word会弹出一个进度框。我已经阅读了Microsoft文档,但似乎没有提供抑制进度框的选项。我们的要求是每30秒自动保存文档,并且经常看到屏幕上闪烁的弹出框会分散注意力,令人沮丧。
有没有办法以编程方式在Word中静默保存文档?
英文:
We have a complex VSTO Add-In for MS Word which automatically saves documents to a network drive. This save should happen completely transparently and in the background. We can't use Word's built-in auto save functionality here as it insists on saving things in OneDrive which isn't appropriate for us. And we can't use auto recover as that only saves to the local computer, not to a network location.
For some users working over a VPN the save can be a little bit slow and Word pops up a progress box. I've read the Microsoft documentation, but it doesn't seem to offer any options to suppress the progress box. Our requirements are to automatically save the document every 30 seconds and seeing a popup box flash on the screen that frequently is distracting and frustrating.
Is there a way to programmatically and silently save a document in Word?
答案1
得分: 2
尝试始终保存到本地文件,然后在您的代码中将其复制到网络驱动器。
英文:
Try to always save to a local file, and copy it to the network drive in your code.
通过集体智慧和协作来改善编程学习和解决问题的方式。致力于成为全球开发者共同参与的知识库,让每个人都能够通过互相帮助和分享经验来进步。
评论