in reply to Re: 'emptyenum' error w/ use Win32::OLE::Const 'Microsoft Word'
in thread 'emptyenum' error w/ use Win32::OLE::Const 'Microsoft Word'

++guha!

Success! Thank you. No more emptyenum complaints (at least after initial testing. :-)

I applied your suggestion to all such wd occurrences:

# instead of: # $x->Selection->Collapse( { Direction=>wdCollapseEnd } ); # do: $x->Selection->Collapse( { Direction=>$wdc->{wdCollapseEnd} } );

As this example also shows, I left other Word-particular terms (such as Selection, Collapse, Direction) alone.

P.S. Yes, I wondered why mine had -1 when others had 65535, but that was a weirdness to leave for another time.