tags:

views:

267

answers:

3

I am planning to implement a small in-house document management system. It must have a web GUI for managing a remote folder structure stored in a database. In these folders are word documents stored (physically as blob in a database). Whenever a user clicks on a document link, a word binary is downloaded via browser and (hopefully) opened in Word on the user's PC.

This is the easy part ;)

Now the user hits "Save" or Ctrl-S. I want to have a functionality programmed inside Word that calls a custom function (maybe in a .NET DLL) that uploads the saved file back to the server (HTTP). The hard part seems to me:

  • How to intercept the Save process to call the extension functionality
  • How to deploy this to multiple users

Thanks a lot for any ideas!

A: 

AFAIK, this is what Alfresco is doing with its Microsoft Office Add-ins (never tested myself though). As Alfresco is open-source, it must be possible to look at what they are doing. Or just ask your questions on Alfresco's forums.

Pascal Thivent
A: 

You can try to override "save" from the ribbon or build your own ribbon tab with the behavior you want. It may be trickier overriding "Ctrl-S".

Overriding the ribbon: StackOverflow Question

Video on altering a standard ribbon button: Office Developer Center

Mike Regan
+1  A: 

Mike's link to the question I answered should do it for intercepting the file save. The specific button idMso for File->Save is "FileSave"

To deploy it to several users machine you can either

1) create a setup project that will create an msi that you can run on all the users machines 2) if it's an intranet scenario, you can keep the assemblies on a network location and just add the neceassary registry settings to all the users machines. This article should describe the settings that you need to include. You would just need to change the path setting to point to the network location.

Jacob Adams