BERLIN—Volkswagen AG said it would work with Microsoft Corp. to develop a new platform for digital services in its cars, the latest move by a major auto maker to embrace technology in the hope it will generate a lucrative stream of revenue in the coming years.