Irradiation of vinylogous amide or imide 5 (R = H, alkyl, or Ac) leads to the selective formation of either crossed photoadduct 7 (R = Ac) or parallel photoadduct 8 (R = H or alkyl) as a function of the nature of the group R. The latter result leads to a novel approach to the synthesis of pyrroles, that is, 8'.