Sage hit as Microsoft buys rival