title: Word API Custom Properties
body: <p>I need some help on word <a href="http://dev.office.com/docs/add-ins/word/word-add-ins-programming-overview" rel="nofollow noreferrer">add-ins</a></p>
  
  <p>I will be programmatically creating a document and as part of that I need to add custom property (Pub_Doc_ID) to the document, as in the picture below. </p>
  
  <p><a href="https://i.stack.imgur.com/AywDo.png" rel="nofollow noreferrer"><img src="https://i.stack.imgur.com/AywDo.png" alt="enter image description here"></a></p>
  
  <p>I am using Word Java APIs now and could not find a way to do this job. The work flow I am targeting is very simple. Create a Document, get the Pub_Doc_Id from DB which is primary Key and assign to the document. Now primary key is attached to the document, so it will be lived with document. </p>
  
  <p><strong>Some more background :</strong> 
  As I mentioned earlier I am using Word APIs. I am adding text, sections, images etch. Now I need to have one connector (Pub_Doc_ID) between Doc and DB. So wanted to use custom properties. If there is any better way to do it. Then let me know.</p>
  
  <p><em>I know how to do this in VSTO. I am looking for Word Java API.</em></p>
  
  <p>This pub_doc_id ID then I will be using to call API's and to load task pane.</p>
  
  <p>Thanks, really appreciate any help on this.</p>
  
  <p>*Pub_Doc_Id : Publishing Document ID.</p>