The New Guides from Selection command adds
four guide lines, one for each of the upper, lower, left and right
edges of the current selection. If there is no selection in the
current image, no guides are drawn.
Activating the Command
You can access this command from the image menubar through
Image → Guides → New Guides from Selection.