Microsoft Corp. said it would buy back up to $40 billion of its shares and raise its quarterly dividend by 22 percent, the Wall Street Journal reports.