OpenXml - iterate through a paragraph's runs and find if a run has italic or bold text
问题 I am trying to iterate through paragraph runs, find if a run has italized/bold text and replace that text with something else. Which is the best method in terms of performance. 回答1: If you are interested only in inline tags, the following code can help. Just change the Convert() method to whatever you want. using System.Linq; using DocumentFormat.OpenXml.Packaging; using DocumentFormat.OpenXml.Wordprocessing; class Program { static void Main(string[] args) { using (var doc =