http://qs321.pair.com?node_id=130771


in reply to Win32::Ole selection

I'm not sure exactly how you want to select the text, but here is one way:
use Win32::OLE; use Win32::OLE::Const 'Microsoft Word'; my $word = Win32::OLE->new('Word.Application'); $word->{Visible} = 1; my $document=$word->Documents->Add; $word->Selection->TypeText("Some Text"); $word->Selection->HomeKey(wdLine); $word->Selection->EndKey(wdLine, wdExtend)
P.S. You can easily findout what you need to do by using word's record macro feature.