General Motors Co. will file paperwork in mid-August to start the process of selling stock to the public, the head of the United Auto Workers union said Thursday.

President Bob King said GM would file the paperwork, called a registration statement, along with its second-quarter earnings. King made the announcement in a statement touting the union's cooperation in the turnaround of the U.S. auto industry.

GM confirmed that the earnings would be released in mid-August, but spokeswoman Renee Rashid-Merem would not comment on when the public stock offering paperwork would be filed with the U.S. Securities and Exchange Commission.

"We'll launch an IPO when the conditions are right and the company is ready," she said.

King's statement came a day before President Barack Obama was scheduled to visit GM and Chrysler factories in Detroit.

Obama will visit GM's Detroit-Hamtramck plant, which is making the Chevrolet Volt electric car, and Chrysler Group LLC's Jefferson North factory where the new Jeep Grand Cherokee is made. He'll talk about how the government's investment in the industry has paid off.

GM received about $50 billion last year from the U.S. government to stay in business and make it through bankruptcy court. The company repaid $6.7 billion, and the balance was converted to a 61 percent government stake in the automaker.

The government hopes to get the rest of the money back when GM sells its shares.

Obama on Thursday said the government will recover all taxpayer money his administration used to bail out the auto industry.

The White House said the president referred only to the $60 billion his administration spent rescuing the auto industry, not the $25 billion spent under the Bush administration. The most recent government estimate found that taxpayers will lose $24.3 billion on the auto bailout.

The Obama and Bush administrations poured $85 billion into General Motors, Chrysler, auto lenders and suppliers to avoid an industrywide meltdown in 2008 and 2009.

Matt Therian, an analyst with Renaissance Capital, a Greenwich, Conn., firm that specializes in public stock offering research, said stock sales normally occur three months from when the paperwork is filed. But it could be done faster, he said.

In the most recent auto industry stock offering, Tesla Motors Inc. filed registration forms with the SEC in January and the sale took place six months later at the end of June.