Example #1
0
 private void GetNodeCharAttribute(Microsoft.Office.Core.TextFrame2 TextFrame)
 {
     Microsoft.Office.Core.TextRange2 Textrange = TextFrame.TextRange;
     spellcheck(Textrange.Text);
     // PPT.TextRange ppttr =(PPT.TextRange) Textrange;
     for (int index = 0; index < Textrange.Text.Count(); index++)
     {
         try
         {
             Microsoft.Office.Core.TextRange2 text = Textrange.Find(Textrange.Text[index].ToString(), index);
             float     sz    = text.Font.Size;
             TextStyle style = new TextStyle();
             style.Size      = sz;
             style.Character = text.Text[0];
             style.Color     = text.Font.Fill.ForeColor.RGB;
             style.FontName  = text.Font.Name;
             TextStlyeList.Add(style);
             TotalTextCount += 1;
         }
         catch (Exception ex)
         {
             Log("\tanalyze slide no " + slide.SlideNumber + " GetCharAttribute exception occur : " + ex.Message);
         }
     }
 }
Example #2
0
 private void getCharacterStyles(PPT.TextRange str)
 {
     for (int index = 0; index < str.Text.Count(); index++)
     {
         try
         {
             PPT.TextRange text  = str.Find(str.Text[index].ToString(), index);
             float         sz    = text.Font.Size;
             TextStyle     style = new TextStyle();
             style.Size      = sz;
             style.Character = str.Text[index];
             style.Color     = text.Font.Color.RGB;
             style.FontName  = text.Font.Name;
             TextStlyeList.Add(style);
         }
         catch (Exception ex)
         {
             Log("Exception occurred. " + ex.Message);
         }
     }
 }