in reply to Microsoft Word - Select next line after a table

Did you use wdline or wdLine? Capitalization makes a difference...

If that's not the problem, you should be able to take care of the bareword error by using quote marks - 'wdLine' and 'wdExtend'. I'm not familiar with controlling Word with Perl, so this is about as much help as I can give.

Replies are listed 'Best First'.
Re^2: Microsoft Word - Select next line after a table (constants)
by Anonymous Monk on Aug 06, 2013 at 23:36 UTC
Re^2: Microsoft Word - Select next line after a table
by jab43 (Initiate) on Aug 07, 2013 at 15:07 UTC

    I got the error removed with your suggestion but it still doesn't do anything.

    So is there another way to select a line or maybe a paragraph? I'm open to any way, using Perl of course.

      This works, but I don't know why:

      $word->Selection->MoveDown({Extend=> 1, Count=> 1});

      Keep in mind that there might be a blank line after your table, so set Count appropriately. It looks like OLE wants a number, rather than 'wdExtend'. Which is weird, but what would you expect from a mashup of Microsoft and open source?

      Update: Following on from Anonymous Monk's advice, putting use Win32::OLE::Const 'Microsoft Word'; at the top of the file fixes this. This works:

      $word->Selection->MoveDown({Extend=> wdExtend, Count=> 1});

        Perfect, thanks a lot!