public void DeleteFormatComments_M1(int sldNum) { int numComments = ActivePPT.Slides[sldNum].Comments.Count; try { if (numComments > 0) { for (int xx = numComments; xx >= 1; xx--) { PowerPoint.Comment myComment = ActivePPT.Slides[sldNum].Comments[xx]; if (myComment.AuthorInitials == "TFR") //if (myComment.Author == shpName + " Error" && myComment.AuthorInitials == "TFR") { myComment.Delete(); // break; } } } } catch (Exception err) { string errtext = err.Message; PPTAttribute.ErrorLog(errtext, "DeleteFormatComments_M1"); } }
public void DeleteFormatComments_M3(int sldnum) { int numComments = ActivePPT.Slides[sldnum].Comments.Count; PowerPoint.Comment myComment = null; try { if (numComments > 0) { for (int i = numComments; i >= 1; i--) { myComment = ActivePPT.Slides[sldnum].Comments[i]; if (myComment.AuthorInitials == "TFR") { myComment.Delete(); } } // --- } } catch (Exception err) { string errtext = err.Message; PPTAttribute.ErrorLog(errtext, "DeleteFormatComments_M3"); } }