Viacom (VIAB) - Get Report , which is expected to post its lowest annual revenue since 2006, will take any victories, however small.

Just hours after Moody's Investment Service said a merger with CBS (CBS) - Get Report "could potentially shore up Viacom's fundamental and financial profile," the owner of Paramount Pictures and MTV said it had raised $1.3 billion in an unusually strong bond sale for a company that has struggled to increase sales.

Moody's said a merger, which the two companies have been asked to consider, may prompt the credit agency to upgrade its rating on the media company's debt. That is, if it can close a deal with CBS.

"The company's fundamentals have obviously eroded, and the leverage of the business has not only increased from that erosion but from past buyback activity," Tony Wible, media analyst at Drexel Hamilton, said in a phone interview. "They needed the extra cash in the absence of selling Paramount."

Viacom needed a successful bond offering to meet a series of debt obligations the company had intended to meet by selling a 49% stake in Paramount Pictures, the Hollywood studio that has endured a series of underwhelming releases and is expected to lose $450 million this year.

But last week, Viacom's board of directors said it would no longer seek to sell a minority position in Paramount, a sharp rebuke of former CEO Philippe Dauman's assessment that the company's capital structure would be best served by turning a stake in the studio into much-needed cash. Viacom's debt stood $12.3 billion at the end of June, saddling the company with a leverage ratio of 3.6 times the value of its total assets, somewhat higher than its own target of three times assets.

Viacom's debt is also the result of having spent more than $15.5 billion in cash between 2011 and 2015 buying back its own shares in a largely fruitless effort to bolster the company's stock price. Shares of Viacom have tumbled 51% over the past two years. Viacom was gaining 0.9% on Friday to $38.08 while CBS was little changed at $54.62.

The prospect of a merger with CBS fueled interest in Viacom's debt offering with investors submitting roughly $15 billion in bond orders, said a Bloomberg report citing people with knowledge of the matter said. Sumner and Shari Redstone, through the family's holding company National Amusements, asked both companies on Thursday to consider an all-stock merger.

A merger, Moodys said, would allow Viacom's 26 cable-TV networks which include Nickelodeon and Comedy Central, to capitalize on CBS's mass appeal to better negotiate fees with pay-TV operators and advertisers. "The merged entity's larger scale, strengthened market position and expected higher free cash flows would allow for greater capacity to carry debt on the balance sheet," Moodys said.

Yet, a deal with CBS still has many hurdles to jump. the company's must hire outside advisers and form committees of their independent directors to determine if such a deal is in shareholders' best interest and then negotiate a price.

In the meantime, Viacom's board must select a new chief executive to fill the position of interim CEO that Tom Dooley will vacate on Nov. 15. Dooley took the company's top job in August after Dauman was dismissed, albeit with a $72 million severance package.

Whoever takes over will have much work to do. Last month Viacom lowered its fourth-quarter earnings forecast amid further erosion of advertising sales and viewership at its core pay-TV networks.

Moody's guarded positive report comes a week after the ratings agency downgraded Viacom's long-term debt to just one level above a junk rating. A day earlier, Viacom sought to address its credit crunch by cutting its dividend in half, freeing up $318.4 million to use for debt financing. 

"It is good that they got the [bond] deal done," Wible added.