title: Word Interop Bookmarks Dont Exist
body: <p>I am currently creating a c# program which uses a template.dotx containing pre-defined building blocks (with bookmarks) to insert pages of content into a new document, all working as follows</p>
  <pre><code>            Word._Application oWord;
              Word._Document oDoc;
              object oMissing = System.Reflection.Missing.Value;
              object bAddress = &quot;bAddress&quot;;
  
              oWord = new Word.Application();
              
              object oTemplate = _template;
              oDoc = oWord.Documents.Add(ref oTemplate, ref oMissing,
              ref oMissing, ref oMissing);
  
              Word.Template objTmpl = (Word.Template)oDoc.get_AttachedTemplate();
              Word.BuildingBlock objBB = objTmpl.BuildingBlockEntries.Item(&quot;PageBB&quot;);
  
              Range where = oDoc.Range(oDoc.Content.End - 1, oDoc.Content.End - 1);
  
              var orng = objBB.Insert(where, true);
              orng.Bookmarks[bAddress].Range.Text = &quot;Address&quot;;
  </code></pre>
  <p>I would like to do this in reverse, to open created file at a later date, and read through each bookmark to get the value.</p>
  <p>The problem is when I open the resulting DocXCreatedFromTemplate.docx, the bookmarks have disappeared. Programmatically, I receive the bookmark not in collection error, but also by allowing word to open and checking manually the bookmarks are replaced with text but the bookmark reference has gone.</p>
  <p>Is there any way to get round this?</p>