I have a requirement to create read-only merge fields in Word.
I’ve already tried using the Locked property which can be seen below.The description of this property states – When a field is locked you cannot update field results which sounds like a perfect fit for my problem but this doesn’t seem to be working
Below is the code i use to add the merge field to MS Word:
using Word = Microsoft.Office.Interop.Word;
Word.Range currentRange = Globals.ThisAddIn.Application.Selection.Range;
Word.MailMerge merge = Globals.ThisAddIn.Application.ActiveDocument.MailMerge;
merge.Fields.Add(currentRange, selectedNode.LocalName).Locked = true;
Once I run the code above and the field is created in Word, I am still able to right click it and select “Edit Field” where I can potentially rename the field or perform other changes without getting any errors or preventions from Word.

If anyone implemented something like this before, please share your knowledge.
Here is some insight on the technologies:
- The solution is targeted at MS Word Office 2010
- It must be written in .NET C# 3.5
- Cannot use Open Xml SDK, the fix must be performed using Office Interop
- The solution must achieve the desired goals without making the whole document read-only
Thank you for the replies, however I needed to only make the merge fields read-only the rest of the document should still stay as is.
A colleague of mine found a nice way to achieve what I was looking for, just sharing it in case someone else may need this functionality:
All you need to do is create a ContentControl object and add your merge field to the content control.
Set the LockContents property to true. This property is used to determine whether a user is allowed to edit the contents of a content control.
In the image below a merge field is hosted inside a content control, note users are now unable to edit the field