Office Integration (Word) - Save Intercept
I am planning to implement a small internal document management system. It must have a web interface to manage the remote folder structure stored in the database. These folders store text documents (physically as a blob in a database). Whenever the user clicks on a document link, the binary word is loaded through the browser and (hopefully) opened in Word on the user's PC.
This is the easy part;)
The user now presses "Save" or Ctrl-S. I want to have functionality programmed inside Word that calls a custom function (perhaps in a .NET DLL) that downloads the saved file back to the server (HTTP). The hard part for me:
- How to intercept the save process to call an extension function
- How to deploy this to multiple users.
Mike's link to the question I answered should do this to intercept the save file. The specific idMso button for File->Save
is "FileSave"
To deploy it to multiple users, you can either
- Create a setup project that will create an msi that you can run on all users' computers.
- If this is an intranet scenario, you can save the assemblies to a network location and simply add the neceassary registry settings to all users' machines. This article should describe the options you need to enable. You just need to change your path setting to point to your network location.
source to share
AFAIK, this is what Alfresco does with Microsoft Office Add-ins (never tested myself). Since Alfresco is open source, it should be possible to see what they are doing. Or just post your questions on the Alfresco forums .
source to share
You can try overriding "save" on the ribbon, or create your own ribbon tab with the behavior you want. It can be harder to override "Ctrl-S".
Overriding the feed: fooobar.com/questions/2504257 / ...
Video when changing the default ribbon button: Office Dev Center
source to share