H&R Block’s new advertising campaign is one of the more ambitious in the company’s 62-year history. It hired the actor Jon Hamm for his first on-camera spokesman role, a significant coup. And the company ditched its “Refund Season” slogan in favor of a more aggressive pitch: “Get your taxes won.”

The ads obviously target Intuit’s do-it-yourself Turbo Tax. More subtle is how much the campaign was really influenced by critical words from one heavy-hitting personality: Donald J. Trump.

It was August 2015, still the early days of the presidential campaign, when Mr. Trump first mentioned that he hoped to “put H&R Block out of business” with his plan for a simplified tax code.

Sixteen months later, the leading tax preparer is still feeling the effects.

“We got kicked around a little bit last year,” Kathy Collins, chief marketing and strategy officer, said. “We realized this was the time to do this.”