Microsoft Corp. shares are heading for their worst month in years as investors continue to fret about how the software giant will fare in a world marked by artificial intelligence.