SharePoint Stack Exchange is a question and answer site for SharePoint enthusiasts. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

How can I dynamically add a SharePoint content type field into a Word document with OpenXML SDK?


share|improve this question
SharePoint should already do this for you automatically... Any reason you need to do it yourself? – Paul Lucas Dec 15 '11 at 13:15
Yes. There is not a standard template for the documents. I need to insert this field into all Word documents programmatically. – Élodie Petit Dec 15 '11 at 16:30
up vote 0 down vote accepted

I'd suggest doing it in an Event Receiver. Where in the word document do you want to add the Content Type ? In a Bookmark ?

I might have some sample code I can send you.


share|improve this answer
Hi Ian. I need to insert the field into footer area. – Élodie Petit Dec 22 '11 at 18:35
What version of Word are you using ? – Ian Jan 3 '12 at 16:29

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.