locked
Identifying my word document RRS feed

  • Question

  • Dear Friends,

    I have developed a Word Addin for 2010 and it is used for various word automation purposes. Now I am going to give the addin to my contractors for free, so that they can work on the word files I send them.

    But I want to ensure that the addin works only in word documents which i send them and not to some other documents. Is there a way to achieve this ?

    One thing which I did was to insert a CustomXML with my information and make the addin work only when this information is present. But it can be broken if they open my document and delete all the contents and paste the contents from some other document and proceed to work in that document with the addin automation.

    Can someone help me in identifying some other secure solution ?

    Thanks,

    Sriram

    Thursday, February 7, 2013 4:45 AM

Answers

  • Hi Sriram

    Well, one possibility would be to create VSTO document-level solutions, where the code is associated with the specific document.

    But I don't think you can avoid what you described in your message:

    "... it can be broken if they open my document and delete all the contents and paste the contents from some other document and proceed to work in that document..."

    short of disabling the paste command. But you'd also have to disable Insert/Object/From file, as well. And probably the Copy command, because what's to prevent anyone from simply working in the document then copy/paste to another document?

    I really don't think there's any way you can limit the way people use your tools and still let them work with Word's full functionality.


    Cindy Meister, VSTO/Word MVP, my blog

    • Marked as answer by Dummy yoyo Monday, March 11, 2013 3:30 AM
    Thursday, February 7, 2013 6:16 AM