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