A method for controlling operation of a wood-handling device in a work machine. The wood-handling device is attached through a rotation device to an end of a set of booms of the work machine to create a desired orientation of the wood-handling device for the operation. The orientation of the wood-handling device using the rotation device is tied on the basis of the operation to be performed using the set of booms. The orientation of the wood-handling device is tied to the position of the end of the set of booms. The position of the end of the set of booms is defined while performing the operation, on the basis of the position of the end of the set of booms. The wood-handling device is oriented using the rotation device, according to the said tie.