1. An offline programming device for preparing an operation program for making a robot with a hand attached thereto perform a handling operation for an object with respect to a machine tool, said object including at least one of a workpiece and a tool, the device comprising: a hand-position designating section designating a relative positional relationship between said object and said hand when said hand holds said object; a first calculating section determining a position and orientation of said object mounted on said machine tool when said robot performs said handling operation, based on a command specifying a position of said object, said command being included in a workpiece processing program given to said machine tool; a second calculating section determining a position and orientation of said robot acting to hold said object by said hand when said robot performs said handling operation, based on said relative positional relationship between said object and said hand designated by said hand-position designating section and said position and orientation of said object determined by said first calculating section; and an operation-program generating section generating said operation program by using said position and orientation of said robot determined by said second calculating section.