public void InsertFooter(Paragraph content, TextDocument document)
{
bool exist = true;
XmlNode node = this._styles.SelectSingleNode("//office:master-styles/style:master-page/style:footer", document.NamespaceManager);//
if (node != null)
node.InnerXml = "";
else
{
node = this.CreateNode("footer", "style", document);
exist = false;
}
XmlNode impnode = this.Styles.ImportNode(content.Node, true);
node.AppendChild(impnode);
if (!exist)
this._styles.SelectSingleNode("//office:master-styles/style:master-page",
document.NamespaceManager).AppendChild(node);
this.InsertParagraphStyle(content, document);
}