Hy,
i parse a template to create a docx document, i valorize variables in template and at the end i need to insert style node in document.xml file.But I could notmake it work
innerText = newNode.InnerText; XmlAttribute attributes= xmldoc.CreateAttribute("w", "instr",field.NamespaceURI); attributes.InnerText = innertext; field.Attributes.Append(newAttr); XmlNode childXmlNode= xmldoc.CreateElement("w", "r",field.NamespaceURI); childXmlNode=field.AppendChild(childXmlNode); resultNode = xmldoc.CreateElement("w", "t",field.NamespaceURI); resultNode .InnerText = innerText; resultNode = childXmlNode.AppendChild(tmpNode); attributes= xmldoc.CreateAttribute("xml:space",field.NamespaceURI); attributes.Value = "preserve"; resultNode .Attributes.Append(newAttr); //styleXmlNode ??
I have already try to insert style node before result node and after
The style is correctly defined in styles.xml.
Thanks for the help
www.Photoballot.net