There are two legal precendents that I know of, Guinn v. The Church of Christ and the Norman Hancock lawsuit (settlement out of court). Both of these are covered on the website TD mentioned, mormonnomore.com (where you can find a lot of valuable information about resignation besides these two legal cases which seem to have changed excommunication only to resignation).
To quote from the website's summary (with some important parts bolded):
In Guinn v. The Church of Christ, Marian Guinn, a member of the Church of Christ of Collinsville, OK, hand delivered her resignation to the minister after he told her he was going to excommunicate her for fornication. The minister refused to honor the resignation, went ahead with the 'excommunication' and then announced it from the pulpit. Guinn sued and was awarded $390,000. On appeal the Oklahoma Supreme Court ruled that Guinn's resignation was effective immediately and that anything the church or the minister did after the minister received Guinn's resignation was tortable. In other words, she could sue for anything they did after she resigned. The court ruled that with her resignation Guinn withdrew her consent to being treated as a member and she withdrew her consent to being subject to church discipline.
Of extra importance is the fact that the court ruled that the right to freedom of religion also includes the right to unilaterally resign from a church.
In 1985 the Mormon church 'excommunicated' Norman Hancock AFTER he submitted a letter of resignation to the church. Hancock filed an $18 million lawsuit against the church, saying a person has a right to voluntarily resign from a church. The suit was settled out of court and the settlement was sealed. An account on line reports that Hancock filed the suit himself, without the aid of a lawyer, after studying the Guinn case. The same account says that church lawyers started discussing with Hancock just how much money he wanted, but he told them he didn't want their money, that what he wanted was to have his name cleared. Church representatives agreed to change the records such that there would no longer be any record of an 'excommuication': the records would show that he resigned (that he asked for 'name removal').
The Hancock case shows that the church is willing to settle out of court when someone sues because the church 'excommunicates' them after they've resigned their membership. There were some defamation issues in the Hancock case that do not apply to most other cases, however.
Jason, I think this is what TD and Ray A are refering to when they say "its legal once its in writing:" i.e., once you've formally declared your resignation you are "out" no matter how long the church's subsequent paperwork takes.
From the Ernest L. Wilkinson Diaries: "ELW dreams he's spattered w/ grease. Hundreds steal his greasy pants."