Orient object based on width?

Hi. Does anyone know a way of orienting objects based on width? Eg accurate vertical alignment based on widest or narrowest orientation of the object?