public static void ShapeTextReplace(PowerPoint.TextRange textRange, Dictionary<string, string> replaces) { // var text = textRange.Text; foreach (var replace in replaces) { while(textRange.Text.Contains(replace.Key)) { textRange.Replace(replace.Key, replace.Value); } } }
private void TextReplace(PowerPoint.TextRange textRange, Dictionary<string, string> replaces) { var text = textRange.Text; foreach (var replace in replaces) { if(text.Contains(replace.Key)) { textRange.Replace(replace.Key, replace.Value); } } }