Beispiel #1
0
 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);
         }
     }
 }
Beispiel #2
0
        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);
                }
            }
        }