(Reuters) - Microsoft Corp has agreed to invest $300 million in Barnes & Noble Inc's Nook digital-book business and college texts, in a deal that helps establish the value of the popular Nook business while giving Microsoft a foothold in the e-book market.