in reply to Re: Win32::Ole selection
in thread Win32::Ole selection

That way would work, but what I'm trying to do is select a known line on the document. In VBA, a command like  ActiveDocument.Paragraphs(1).range can be used to select a specific line on the document (in this case the 1st) but I can't seem to be able to convert this command ....
Thanks anyway.

Replies are listed 'Best First'.
Re: Re: Re: Win32::Ole selection
by Bloodelf (Beadle) on Dec 11, 2001 at 02:08 UTC
    Solved it!
    use Win32::OLE; my $word = Win32::OLE->new('Word.Application'); $word->{Visible} = 1; my $document=$word->Documents->Add; $word->Selection->TypeText("Some Text"); $word->Selection->Paragraphs("1"); $document->Select->ActiveDocument->Paragraphs(1)->range;
    Cheers.
      correction.....
      use Win32::OLE; my $word = Win32::OLE->new('Word.Application'); $word->{Visible} = 1; my $document=$word->Documents->Add; $word->Selection->TypeText("Some Text"); $word->ActiveDocument->Paragraphs(1)->range->Select;
      (...Doh!)