At last, Yahoo (YHOO) CEO Carol Bartz and Microsoft (MSFT) boss Steve Ballmer are talking about a potential search and advertising deal.

Early discussions began in the last several weeks and the two met face-to-face last week, according to AllThingsD's Kara Swisher. The talks are "preliminary" and "wide ranging," according to Swisher's sources, but are not about a renewed attempt for Microsoft to buy Yahoo. (That ship has sailed, for now at least.)

This is good news. Microsoft needs a search deal, and if structured properly, one could benefit Yahoo as well.

Yahoo's position, while more desirable than Microsoft's, will likely only weaken to Google (GOOG). So it's better off focusing on display advertising, while collecting cash from a search operation that Microsoft runs. By combining, the two also offer a stronger alternative to Google for advertisers, which advertisers want -- if for any reason, to have some leverage over Google themselves.

Bartz must not make the mistake of making Microsoft a permanent partner -- let it play Microsoft and Google off each other in a few years once Yahoo is in a stronger position. But for now, a deal with Microsoft -- again, provided it's structured right -- is a good move.

Henry Blodget contributed to this report.