## Within the for loop -- my $selection = $doc->Words->Item($i)->Select(); $page = $selection->Information(wdActiveEndPageNumber);