Texas Board Certified Estate Planning & Probate Law

A specialized estate planning and probate law firm in Denton County, TX, board certified by the Texas Board of Legal Specialization. Our focused practice allows us to give clients the kind of personal attention they need and deserve in matters of Estate Planning, Probate, Probate Litigation, and Wills & Trusts.

Wills & Trusts

Wills and living wills can save your survivors from the headaches in both time and money they will have to spend sorting through your affairs. … [Read More...]

Estate Planning

Making careful and educated decisions will streamline the flow of your assets and guarantee they are dispersed quickly and to the intended recipients. … [Read More...]

Estate Administration

When dealing with the aftermath of a loved one’s death, a knowledgeable estate planning and probate law attorney can be the best resource you can … [Read More...]

Probate Litigation

Contesting a will is wrought with emotion. Engaging a knowledgeable attorney with courtroom experience in handling probate matters can be your best … [Read More...]

Proven Track Record

Our law firm is uniquely equipped to handle high level, complex estate tax law and estate issues as well as simple wills and trusts. We receive many referrals from other lawyers because of our specialization. We use time-tested tools and methodologies to help our clients plan for their future and administer the wishes of their deceased loved ones.

Our colleagues in the legal industry have given us the highest ratings for our adherence to professional standards of conduct and ethics, reliability, diligence and other criteria relevant to the discharge of professional responsibilities. We are also known for our legal knowledge, legal experience, analytical and communications abilities, and judgment. For our clients, this translates to high quality, professional service to meet all their estate planning, probate, and estate administration needs.

CiAgICAgICAgICAgICAgICA8ZGl2IGNsYXNzPSdnZl9icm93c2VyX3Vua25vd24gZ2Zvcm1fd3JhcHBlcicgaWQ9J2dmb3JtX3dyYXBwZXJfMScgc3R5bGU9J2Rpc3BsYXk6bm9uZSc+PGEgaWQ9J2dmXzEnIGNsYXNzPSdnZm9ybV9hbmNob3InID48L2E+PGZvcm0gbWV0aG9kPSdwb3N0JyBlbmN0eXBlPSdtdWx0aXBhcnQvZm9ybS1kYXRhJyB0YXJnZXQ9J2dmb3JtX2FqYXhfZnJhbWVfMScgaWQ9J2dmb3JtXzEnICBhY3Rpb249Jy8jZ2ZfMSc+CiAgICAgICAgICAgICAgICAgICAgICAgIDxkaXYgY2xhc3M9J2dmb3JtX2JvZHknPjx1bCBpZD0nZ2Zvcm1fZmllb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ICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgIDwvc3Bhbj4KICAgICAgICAgICAgICAgICAgICAgICAgICAgIAogICAgICAgICAgICAgICAgICAgICAgICAgICAgPHNwYW4gaWQ9J2lucHV0XzFfMV82X2NvbnRhaW5lcicgY2xhc3M9J25hbWVfbGFzdCcgPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgPGlucHV0IHR5cGU9J3RleHQnIG5hbWU9J2lucHV0XzEuNicgaWQ9J2lucHV0XzFfMV82JyB2YWx1ZT0nJyBhcmlhLWxhYmVsPSdMYXN0IG5hbWUnIHRhYmluZGV4PSc0JyAgIGFyaWEtaW52YWxpZD0iZmFsc2UiIC8+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8bGFiZWwgZm9yPSdpbnB1dF8xXzFfNicgPkxhc3Q8L2xhYmVsPgogICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICAgICA8L3NwYW4+CiAgICAgICAgICAgICAgICAgICAgICAgICAgICAKICAgICAgICAgICAgICAgICAgICAgICAgPC9kaXY+PC9saT48bGkgaWQ9J2ZpZWxkXzFfNCcgY2xhc3M9J2dmaWVsZCBnZmllbGRfY29udGFpbnNfcmVxdWlyZWQgZmllbGRfc3VibGFiZWxfYmVsb3cgZmllbGRfZGVzY3JpcHRpb25fYmVsb3cgZ2ZpZWxkX3Zpc2liaWxpdHlfdmlzaWJsZScgPjxsYWJlbCBjbGFzcz0nZ2ZpZWxkX2xhYmVsJyAgPkkgcHJlZmVyIHRvIGJlIGNvbnRhY3RlZCBieTo8c3BhbiBjbGFzcz0nZ2ZpZWxkX3JlcXVpcmVkJz4qPC9zcGFuPjwvbGFiZWw+PGRpdiBjbGFzcz0nZ2lucHV0X2NvbnRhaW5lciBnaW5wdXRfY29udGFpbmVyX2NoZWNrYm94Jz48dWwgY2xhc3M9J2dmaW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