1

I would like to implement WordAddin. I need to have json list related in my word document. My functionality search word document and base on some criteria crate json string.

I would like to store this json string in word document and use it later if needed. It would be perfect to easy store and easy get this json. I want have all data in word document, so separate files or database are not options.

My question is: where to store this json string?

Possible solutions I can see are :

  • Save on document as text and then hide and protect this text
  • Save to file and attach this file to word document (protect and hide)

Is there some better place where could I store data like this in word document?

Raskolnikov
  • 3,791
  • 9
  • 43
  • 88
  • 2
    You can add custom properties to Word documents, create one, for example called `MyJSON` and set it to the value you need. Not sure if there's a maximum size though. – DavidG Sep 26 '17 at 13:15

1 Answers1

2

Each Microsoft Word document has metadatas and properties. I would recommend to store your Json into one of these.

Here's some examples on how to do it:

Note that properties can be read by the users (if they know what they are searching for).

Beltaine
  • 2,721
  • 1
  • 18
  • 22