Requirement:-
Vs 2008
Vsto
Code:-
private void ThisDocument_Startup(object sender, System.EventArgs e)
{
Linquse_InWord_Vsto("Avinash Tiwari Linq Sample");
}
public void Linquse_InWord_Vsto(String strText)
{
var qChars = from c in strText select c;
int charCount = qChars.Count();
List
var qLetterWords = textWords.FindAll(x => (x.Length >= 2));
this.Application.Selection.InsertAfter("\n Character Count: " + charCount + "\n Word Count: " + qLetterWords.Count);
this.Application.ActiveDocument.Content.InsertBefore(strText);
}
Output:-
No comments:
Post a Comment