That doesn't make any sense. But if your car vibrates at idle and stand still, then you probably have a fuel delivery or ignition problem that is causing a misfire.
I would look for a vacuum leak.
Fast idle motor is not working. This is allowing the idle to fall below the threshold of what it should be when the A/C is on.
Possible bad motor mount
It would depend on what time of the day it was
Take it to auto zone and hav3 the codes read for free.
Probably insufficient idle speed. Most have a compensator to increase idle when it's turned on, use a tach to check. <><><><><> Most modern cars have an Idle Air Control (IAC) to control idle, and the computer handles it automatically. Some older cars, such as the 84 Caprice Classic, had an adjustable solenoid that stepped up idle when the compressor was on. If yours is one of these, make sure that the solenoid is extending when it should. In the case of the Caprice, it could be adjusted by turning the shaft via the nut on the end, but you should check your shop manual just to be sure.
Bad idle, lack of power. Vehicle may shake or vibrate at idle.
Check pLugs and wires and the vibration my be from brake pads or warped rotors
The engine is running C O C K
Check pLugs and wires and the vibration my be from brake pads or warped rotors
Unbalanced tires, warped rotor, bad engine mount, bent drive shaft, bent wheel, bad wheel bearings, bad U-Joint or CV joint, or your car might have a rough idle.
The most probable cause would be the idle control on the engine. When you put a car in gear, there is a "load" put on it (the transmission is using power) and the idle speed normally drops. The idle could be dropping to the point where it becomes unstable and causes the engine to vibrate.