in reply to Word and Win32::OLE

Are you sure that the method WholeStory is the one you want to call? The default property for the Selection object is Text. try
$Word->Selection->{Text};

Replies are listed 'Best First'.
Re: Re: Word and Win32::OLE
by CubicSpline (Friar) on Sep 20, 2001 at 22:06 UTC
    Rereading your post, I think I might have jumped the gun. It looks like the WholeStory method selects the entire text of the document. So you'd still want to do that, but then try setting your variable with the Text property call as shown.