Ian Grieve has a Script To Copy Segments To A New Company
Script To Copy Segments To A New Company | azurecurve
Archived post from 2014. Dynamics GP and the links it points to have changed since; check current documentation before relying on version-specific steps.