diff --git a/OpenXmlFormats/Wordprocessing/wml.cs b/OpenXmlFormats/Wordprocessing/wml.cs index fa7aa3937..77eda1fcb 100644 --- a/OpenXmlFormats/Wordprocessing/wml.cs +++ b/OpenXmlFormats/Wordprocessing/wml.cs @@ -2258,7 +2258,10 @@ internal void Write(StreamWriter sw, string nodeName) this.space = "preserve"; XmlHelper.WriteAttribute(sw, "xml:space", this.space); sw.Write(">"); - sw.Write(XmlHelper.EncodeXml(this.valueField)); + if (this.valueField != null) + { + sw.Write(XmlHelper.EncodeXml(this.valueField)); + } sw.Write(string.Format("", nodeName)); }