The first Communist takeover -- the Bavarian free state -- was put down by Weimar.
A little time lines (from Wikipedia):
March 1919 Adolf Hitler finishes job of guarding Russian prisoners. April 6 and April 7, 1919 Bavaria declared a Soviet Republic. April 14, 1919 Freikorps suppress Communists in Dresden. April 18, 1919 Freikorps suppress Communists in Brunswick. Also: Battle of the Bavarian governments at Dachau. Communists defeat republican forces. April 27, 1919 Battle for Munich between Communists and Freikorps units. April 29, 1919 German representatives arrive in Paris. May 1, 1919 Communist defences at Munich breached. May 2, 1919 City of Munich taken; not declared secure until May 6th; aprox. 1200 Communists killed. May 10, 1919 Freikorps suppress communists in Leipzig.
Weimar Republic took credit for the suppression of the Communist Revolution, but would never succeed without activity of the volunteers and proto-Fascists in Freikorps, paramilitary organizations of veterans etc ... German version of Fascism grew out of this milieu.
The struggle did not end in 1919, but continued until Nazi takeover in many political skirmishes, street fights, acts of intimidation, competition for the followers (many former Communists change the allegiance to from Red to Brown) etc ...
The forces of Weimar Republic were demoralized and disorganized, undermined from the left and right.
You can find some descriptions in Mein Kampf.
The right wing forces defeated Communists in Spain thanks to the help from Nazi Germany and Fascist Italy.