We demonstrate the feasibility of a scenario by which a star in a common envelope blows a collimated wind as it evolves from the asymptotic giant branch (AGB) to the central star of a planetary nebula. The collimated flow turns into jets along the symmetry axis. These jets then form in their leading front the ansae- two opposite bright knots along the major axis which are observed in many elliptical planetary nebulae. An essential ingredient in the proposed scenario is that the evolving AGB star is in a common envelope with a low-mass companion. The low-mass companion, which orbits close to the giant core, spins up the envelope efficiently at late stages of the evolution. We calculate the surface shape of the rotating envelope by assuming a simple angular momentum distribution. The deformed surface of the rotating envelope is assumed to blow a substantial fraction of the wind along the rotation axis. The proposed scenario leads to two types of jets and ansae. One type is slow, approximately 50 km s-1, and relatively heavy-a total mass of less-than-or-similar-to 10(-3) M.. The second type, which can continue to be active during the planetary nebula stage, is fast, 100-300 km s-1, and light approximately 10(-4) M..