Microsoft isn't exactly known for releasing source code. However, the company has decided to pull back the curtain on early versions of Word and MS-DOS. The source code for Word for Windows 1.1a, MS-DOS 1.1, and MS-DOS 2.0 has been released in cooperation with the Computer History Museum. The code is available under a research license that prevents commercial use but otherwise seems pretty accommodating. Sadly, the retro graphics from the original box art aren't included.
The Computer History Museum has a couple of interesting posts explaining the history behind MS-DOS and Word for Windows. Those articles include links to the source, and they're worth reading for a dose of nostalgia. They also make me feel very old.
The actual code is probably a little too dry for non-programmers. If sifting through code is your idea of a good time, though, the museum also has source for APL, Apple II Dos, Photoshop, and Macpaint.