This project has moved. For the latest updates, please go here.

Custom Properties in header/footer not updating.

Mar 29, 2011 at 3:30 PM

Hi Cathal,

I am using the library to update custom properties. I have the same custom property in the header of the document and the main body of the document.

The field(s) in the body of the document are updated correctly, the ones in the header are left with default values.

I have tried the very latest change set 63004 without success (although it did fix some other stuff ;-)

The code is standard:

  using (var docx = DocX.Load(@"c:\somepath\TestTemplate.docx"))
            {
                docx.AddCustomProperty(new CustomProperty("MyProperty", "E1-234567890"));
                docx.SaveAs(@"c:\somepath\desktop\Output.docx");
            }

 

 

 

 

 

 

 

 

 

 

 

 

 

 

 

I'll email you the template docx file.

Thanks,

Grant.