my $doc = $word->Application->Selection; # Selection can be the entire doc or refined to a sub-set of text # It is easier to use the functions that exist in word to do the work. $num_paragraphs = $selection->Paragraphs->{Count}; $num_words = $selection->Words->{Count}; $num_chars = $selection->Characters->{Count}; $num_pages = $selection->pagenumbers->{Count};