Esempio n. 1
0
 private static void ReplaceWordRun(OXD.Paragraph paragraph, OXD.Run initRun, OXD.Run finalRun)
 {
     if (null != paragraph.Descendants <OXD.Run>())
     {
         List <OXD.Run> runs = paragraph.Descendants <OXD.Run>().ToList();
         foreach (var run in runs)
         {
             if (initRun != run)
             {
                 paragraph.RemoveChild <OXD.Run>(run);
             }
         }
         paragraph.ReplaceChild <OXD.Run>(finalRun, initRun);
     }
 }