tags:

views:

37

answers:

1

elem is obtained by searching various document parts, both MainDocumentPart.Document and HeaderParts:

                Text text = elem.GetFirstChild<Text>();
                System.Console.Write("Updating content from '{0}'", text.Text);
                text.Text = "blah";
                System.Console.WriteLine(" to '{0}'", text.Text);

In all cases the output is exactly as expected to stdout, it looks to work perfectly. But when the file is saved, only changes to the main body text are seen... the header remains unchanged. Do I have to unlock the header or something?

+1  A: 

Call HeaderPart.Header.Save() on the Header that contains elem.

Mark L