I know nothing about microsoft office development, but I would like to build a prototype of a plugin will allow a user to Save and Open documents from a remote repository. Perhaps later build in a version control system on the server - but the server side piece is about the easiest portion of it (in my case). Perhaps I should focus on getting this to work for one office application at a time - say MS WOrd (unless folks think excel is easier to work with). And lets target Office 2007 (as that is what I have installed).
Saving
The repository will store the document Tagged (by many tags, of many types). Saving the document the AddIn will need to first Show a dialogue and allow the tagging. The AddIn needs to submit an array of Tags along with the document (Base 64 encoded?) over a SOAP or REST api to our servers. Few questions
- Is this possible? if so suggestions as to how it could be accomplished? Is there a mechanism for gaining access to the binary data (stream?) of the document you are viewing?
- Is it possible to piggy back this off of the File-SaveAs dialogue? OR will i need to create my own menu-item? Obviuos the former is probably more familiar with users...
- Is there already a mechanism for remote document persistance I can piggy back off of?
Opening
Once a number of documents have been saved, we will need a method of retrieving the documents / opening them. So I would think I would need a dialogue that allows browsing docucents Tag Type -> Tag Values (there may be more levels to the tree, but want to start there). ONce the document is opened I think the API would need to
- Make the RPC call (SOAP / REST) to retrieve the document - decode the content (actual document) and open that stream inside of Word (for example)
- I would also like to keep my tags in memory
XML Design
In order to best visualize the data being exchanged between Word and the server lets imagine an XML Structure like:
<document name="recapOfTheGame.doc">
<tags>
<tag type="team">New York Yankees</tag>
<tag type="team">Boston Redsox</tag>
<tag type="city">New York</tag>
<tag type="city">Boston</tag>
<tag type="type">recap</tag>
</tags>
<content encoding="base64">AKJSGHKASHGFKSJDHGFKSJDHGFSKDJFHGSKJDGSKDJGSKDJFHGSDKJFH</content>
</document>
the repository explorer should show this document in multiple places in the tree; Here is an example of a repository showing this document in five places (based on the tags):
repository
+ untagged <not shown in XML>
- team
+ Tampa Bay Rays <not shown in XML>
- Boston Resox
recapOfTheGame.doc
- New York Yankeeys
recapOfTheGame.doc
- city
+ Tampa Bay <not shown in XML>
- new york
recapOfTheGame.doc
- boston
recapOfTheGame.doc
- type
+ box scores <not shown in XML>
- recaps
recapOfTheGame.doc
Other Thoughts
I only provided the XML design to make the concept more tangible, and I am open to other methods of storing the tag (within the document if that is possible). Basically any direction I can be given on this endeavor would be greatly appreciated.
I asked this question differently to check if the responses would differ, http://stackoverflow.com/questions/3737728/open-word-document-from-database-or-webservice
I am accepting the webDav answere - below as it is common between the two and is what alfresco does.
Thank you