The actress Brenda Vaccaro will replace Valerie Harper in “Nice Work if You Can Get It” at the Ogunquit Playhouse, the theater announced Saturday. Harper had to be hospitalized Wednesday when she fell ill shortly before that evening’s performance. Harper is best known for her performance as Rhoda Morgenstern in the “Mary Tyler Moore Show.” Vaccaro starred in “Midnight Cowboy” and was twice nominated for an Academy Award and five times for a Tony Award. This story will be updated.