Her face fixed in a smile, Margaret Heckler strode into the Dedham Probate Court today, shaking hands and pecking cheeks of those she recognized from the days when her congressional district adjoined this Boston suburb.

"How are you?" she asked a court employe. "It's been years."

Were it not for the nervous clenching and unclenching of her fists, the health and human services secretary could have been on the campaign trail, instead of at the first day of trial of the case captioned Margaret Mary O'Shaughnessy Heckler v. John McGuire Heckler, her divorce suit against her husband of more than 30 years.

Margaret Heckler, 53, sat impassively, sometimes jotting notes on a legal pad, sometimes gazing out the window at the picture-perfect New England scene complete with white steepled church and gently falling snow, as the lawyer for John Heckler, 57, admitted that his client had committed adultery but blamed it on Margaret Heckler's alleged refusal to "engage in marital relations" since 1963 -- four years before John Heckler's first admitted infidelity.

"This marriage has been a marriage in name only since 1963," John Heckler's lawyer, Edward Lev, told Massachusetts Probate Judge Edmund V. Keville. Margaret Heckler's actions, he charged, "condemned my client to a life of either celibacy or adultery."

Margaret Heckler, who was first elected to Congress in 1966, "condoned" her husband's infidelity to keep the marriage together, Lev added. "She wanted at all costs to avoid a divorce which would harm her political career. Her political ambitions were all-consuming," he said.

"Margaret Heckler's main concern is to protect the dignity of the marriage, the children and the family, and she will not litigate these issues through the press the way John Heckler has," Jeffrey Rosenfeld of Fairfax, one of Heckler's lawyers, said later. "It's getting to be old hat."

The couple, who have three children now in their twenties, did not speak to each other today. Margaret Heckler, who was accompanied by three security guards, her special assistant and an old friend who was on her congressional staff, as well as a team of four lawyers, greeted him "in a nodding way" when she first entered the courtroom this morning, John Heckler said. "We haven't spoken in months," he said. "The lawyers have been doing the talking."

"I'm going to say one thing only -- that this is a very sad chapter in the Heckler family history," Margaret Heckler said before the trial got under way today. "The whole issue here is essentially a financial one," she said. "When it's determined by the court we'll all be better off."

Among the assets that are at issue are the couple's three-story 19th-century colonial house in Wellesley, where John Heckler is living, their three-bedroom, two-floor condominium at the Weslie in Rosslyn, which cost $318,000 in 1981, and, most important, the value of John Heckler's financial investment business, which Heckler claims he built into an enterprise worth millions, and which Margaret Heckler claims she is entitled to share in.

In turn, John Heckler will attempt to demonstrate the financial value of his wife's Cabinet seat in terms of her enhanced earnings potential when she leaves office, according to Mark Sandground, John Heckler's Washington divorce lawyer. John Heckler claims he helped his wife get the post by years of bolstering her political career.

Although Sandground is renowned for his no-holds-barred zeal in litigating divorces, he plans to stay in the background this time, registering at a Boston hotel under the name of P. Revere so that he can consult on trial strategy. But the main legal battle will be between two blue-chip, old-line Boston law firms, Warner and Stackpole (whose Samuel Adams, a former superior court judge and descendant through a mutual grandfather of the Sam Adams of colonial days, is representing Margaret Heckler), and Sullivan and Worcester, where Lev is leading John Heckler's legal team.

"You adapt to the circumstances," Sandground said of his decision that D.C. flamboyance might not play well before a Boston judge.

Even without Sandground, however, the trial, which is expected to last two weeks and to feature testimony by both husband and wife, promises to be a nasty battle.

Margaret Heckler charges her husband with "cruel and abusive" treatment. John, who originally sued for divorce in Arlington in December 1983, in the hope that a judge outside the state where his wife spent the bulk of her political career would be more sympathetic to his plight, has filed a countersuit in Massachusetts, claiming "cruel and abusive" treatment and an "irretrievable breakdown" of the marriage.

Today, Margaret Heckler's lawyers asked that John Heckler be barred from testifying or presenting evidence on his conduct during the marriage and financial contributions to it because of his refusal to answer questions about extramarital affairs during a pretrial deposition. John Heckler had invoked the Fifth Amendment during the deposition, claiming that his answers about activities after 1978 might tend to incriminate him in adultery, a crime for which there is a six-year statute of limitations.

(Last week, a D.C. Superior Court judge refused to order a woman, who is alleged to be among those with whom John Heckler had affairs, to answer questions on her sexual relations with him in 1981. She also invoked her Fifth Amendment privilege.)

Margaret Heckler's lawyer, Adams, argued that it was necessary for John Heckler to answer his questions -- not to prove adultery, which John Heckler has already admitted -- but to learn how much time Heckler had devoted to his business.

"Conduct short of adultery is just as much of an issue and our case can be made without that ultimate question," said Adams.

But Lev, John Heckler's lawyer, said Adams was trying to trap his client in a "snare" by getting him to invoke the Fifth Amendment and then seeking to bar him from testifying. In addition, he said, if John Heckler starts to answer questions about his relationships with other women, he has waived his Fifth Amendment privilege and can be forced to tell the entire story.

Margaret Heckler will stay with friends near Boston throughout the trial, her special assistant, Roger Woodworth, said today. "She takes her office with her," Woodworth said. "She'll be working at the recess, she was working late last night and I expect she'll be working tonight. The business doesn't stop; we just have to squeeze it in."