$Word->Selection->EndKey( { Unit => 6 } ); # wdStory = 6 $Word->ActiveDocument->Close;