public Paragraph AddPhones(bool keepnext) { var paragraph1 = new Paragraph { RsidParagraphMarkRevision = "00E7001C", RsidParagraphAddition = "00E7001C", RsidParagraphProperties = "005205ED", RsidRunAdditionDefault = "00E7001C" }; var paragraphProperties1 = new ParagraphProperties(); var spacingBetweenLines1 = new SpacingBetweenLines { After = "0", Line = "240", LineRule = LineSpacingRuleValues.Auto }; var paragraphMarkRunProperties1 = new ParagraphMarkRunProperties(); var runFonts1 = new RunFonts { ComplexScriptTheme = ThemeFontValues.MinorHighAnsi }; var fontSize1 = new FontSize { Val = "20" }; var fontSizeComplexScript1 = new FontSizeComplexScript { Val = "20" }; paragraphMarkRunProperties1.Append(runFonts1); paragraphMarkRunProperties1.Append(fontSize1); paragraphMarkRunProperties1.Append(fontSizeComplexScript1); var keeplines = new KeepLines(); paragraphProperties1.Append(keeplines); if (keepnext) { paragraphProperties1.Append(new KeepNext()); } paragraphProperties1.Append(spacingBetweenLines1); paragraphProperties1.Append(paragraphMarkRunProperties1); paragraph1.Append(paragraphProperties1); var needbreak = false; if (HomePhone.HasValue()) { var run1 = new Run { RsidRunProperties = "00E7001C" }; if (needbreak) { run1.Append(new Break()); } needbreak = true; var runProperties1 = new RunProperties(); var runFonts2 = new RunFonts { ComplexScriptTheme = ThemeFontValues.MinorHighAnsi }; var fontSize3 = new FontSize { Val = "20" }; runProperties1.Append(fontSize3); runProperties1.Append(runFonts2); var text1 = new Text(); text1.Text = HomePhone.FmtFone("H"); run1.Append(runProperties1); run1.Append(text1); paragraph1.Append(run1); } if (head.Cell.HasValue()) { var run4 = new Run { RsidRunProperties = "00E7001C" }; if (needbreak) { run4.Append(new Break()); } needbreak = true; var runProperties4 = new RunProperties(); var runFonts5 = new RunFonts { ComplexScriptTheme = ThemeFontValues.MinorHighAnsi }; var fontSize3 = new FontSize { Val = "20" }; runProperties4.Append(fontSize3); runProperties4.Append(runFonts5); var text3 = new Text(); text3.Text = $"C {head.First}: {head.Cell.FmtFone()}"; run4.Append(runProperties4); run4.Append(text3); paragraph1.Append(run4); } if (spouse != null && spouse.Cell.HasValue()) { var run4 = new Run { RsidRunProperties = "00E7001C" }; if (needbreak) { run4.Append(new Break()); } needbreak = true; var runProperties4 = new RunProperties(); var runFonts5 = new RunFonts { ComplexScriptTheme = ThemeFontValues.MinorHighAnsi }; var fontSize3 = new FontSize { Val = "20" }; runProperties4.Append(fontSize3); runProperties4.Append(runFonts5); var text3 = new Text(); text3.Text = $"C {spouse.First}: {spouse.Cell.FmtFone()}"; run4.Append(runProperties4); run4.Append(text3); paragraph1.Append(run4); } return(paragraph1); }