
670 S.W.2d 752 (1984)
NATIONAL WESTERN LIFE INSURANCE CO., Relator,
v.
Honorable Herman JONES, Respondent.
No. 14123.
Court of Appeals of Texas, Austin.
May 9, 1984.
*753 Will D. Davis, Heath, Davis & McCalla, R. James George, Jr., Graves, Dougherty, Hearon & Moody, Austin, for relator.
Patrick F. McManemin, Jane White, Newman, Shook & McManemin, Dallas; Scott R. Kidd, Brown, Maroney, Rose, Baker & Barber, Austin, for Harmon Walters.
Before SHANNON, EARL W. SMITH and GAMMAGE, JJ.
SHANNON, Justice.
This proceeding in mandamus attacks the validity of an order of a district judge overruling a motion to disqualify an attorney. National Western Life Insurance Co., relator, complains of Honorable Herman Jones, Judge Presiding of the 126th District Court of Travis County. Judge Jones signed the order overruling the motion on August 29, 1983, which order relator seeks to have vacated by writ of mandamus. This Court will deny the petition for writ of mandamus.
In the lawsuit underlying this proceeding, Harmon Walters sued National Western Life Insurance Co., in the district court of Travis County for damages arising from an alleged breach of a "Foreign Insurance Manager's" contract entered into in 1968 by Walters and the insurance company. Walters alleged that by the terms of the contract he was appointed the insurance company's exclusive agent to handle all of the company's sales and service of foreign insurance policies. Walters pleaded that he had performed all of his obligations under the contract, but that the insurance company had breached the contract in several respects.
The insurance company, on the other hand, claimed that the contract did not vest Walters with the exclusive right to handle its foreign insurance sales and service. The insurance company pleaded, alternatively, that should the contract be determined ambiguous, the company would show evidence of its past transactions in the sale of foreign insurance which would establish that the intent of the parties was that Walters not have an exclusive contract, but instead that he receive commissions only from policies which he sold or those which were sold by his agents.
The insurance company further denied any breach of the contract but claimed rather that Walters and the company had agreed to modify the contract in several respects.
By way of counterclaim the insurance company alleged that the contract was an illegal diversion by Walters, a former officer of the insurance company, of a lucrative corporate opportunity owned by the company and its stockholders. The insurance company urged further that Walters obtained the 1968 contract in exchange for promises to pay illegal and secret "kickbacks" to relatives of the insurance company's then president and to a trust for the children of the insurance company's principal shareholder.
In response to the insurance company's motion, the district court granted a partial summary judgment establishing that the contract between Walters and the insurance company appointed Walters as a non-exclusive (rather than an exclusive) agent for the company's foreign insurance business.
The insurance company moved to disqualify Walters' attorney, Frank G. Newman, from acting as counsel in the lawsuit. The motion to disqualify hinged upon the insurance company's claim that Newman was its principal attorney from about 1966 to 1970. In the motion the insurance company maintained that Newman, as its counsel, *754 participated in and advised the company about the very "Foreign Insurance Manager's" contract at issue. The insurance company insisted, accordingly, that the district court should disqualify Newman and his firm from representing Walters in the lawsuit.
After a two-day evidentiary hearing, Judge Jones signed an order on August 29, 1983, denying the insurance company's motion to disqualify Newman. The court's order recited that the insurance company had failed to show any substantial relationship between Newman's past representation of it and Newman's representation of Walters in the pending cause of action.
By several points the insurance company insists that Judge Jones abused his discretion in denying the motion to disqualify because all of the evidence, or alternatively, the great weight and preponderance of the evidence, shows that Newman's past representation of the insurance company involved matters substantially related to the underlying lawsuit.
An attorney will be disqualified from representing a client in litigation against a former client if the matters in the instant litigation are shown to be "substantially related" to the matters involved in the former representation. Howard Hughes Med. Inst. v. Lummis, 596 S.W.2d 171 (Tex.Civ.App.1980, writ ref'd n.r.e.).
The insurance company's primary position is that the 1968 contract, as a matter of law, did not appoint Walters as the company's exclusive agent for the providing of foreign insurance business. The insurance company's fall-back position was, however, that if the court concluded that the contract was ambiguous, then evidence of the transactions leading up to the formation of the contract would be admissible to show that the intent of the parties to the contract was that Walters not have an exclusive agency. It is in this contention that the insurance company characterizes Newman's involvement in its affairs as being nothing less than "pervasive." The company suggests that it would be unfair to it and offensive to the public and the legal system for Newman to be permitted, as Walters' attorney, to cross-examine representatives of his former client concerning the very transactions about which he had advised the company.
The insurance company's concern pertaining to Newman's participation in the development of facts leading up to the formation of the contract is now mooted in view of the company's success in obtaining the partial summary judgment establishing, as a matter of law, that the 1968 contract did not appoint Walters as an exclusive agent for its foreign insurance business. This is so, of course, since extrinsic evidence will not now be admissible to show the intent of the parties to the contract.
The insurance company admits that the issue of Newman's representation is narrowed by the district court's rendition of the partial summary judgment. The company reminds the Court, however, that the controversy is very much alive in view of the position taken in its counterclaim. The insurance company points to Newman's alleged role in its claim that the contract was an illegal diversion of a corporate opportunity and was the product of promised "kickbacks" to relatives of the company's then officers and shareholders.
In support of its counterclaim, the insurance company claimed and endeavored to prove that in 1967 Newman's "brainchild," International Insurance Service, Inc., was created to permit the diversion of its corporate funds to relatives of officers and principal shareholders of the company. Newman purportedly handled the formation of the subsidiary and advised Robert Moody to arrange for an exclusive agency agreement with the subsidiary. Newman's law firm was supposed to have billed the insurance company for costs in forming the new corporation and Newman's associates in the law firm were aware of this relationship. Other evidence, however, tended to lessen or practically eliminate Newman's or his law firm's role in this alleged transaction.
*755 A writ of mandamus will lie only wherein the duty to act is clear and the facts are undisputed. Jessen Associates, Inc. v. Bullock, 531 S.W.2d 593 (Tex.1976); Dikeman v. Snell, 490 S.W.2d 183 (Tex. 1973); Cobra Oil & Gas Corporation v. Sadler, 447 S.W.2d 887 (Tex.1969); Bigham v. Sutton, 565 S.W.2d 561 (Tex.Civ. App.1978, no writ). Whatever evidence exists of a substantial relationship between Newman's previous representation of the insurance company and the subject of the underlying litigation is disputed. It is, of course, not the function of mandamus to establish, as well as enforce, a claim of uncertain merit, for if the right be doubtful, it must be established first in some other form of action. Bigham v. Sutton, supra.
If the insurance company can show that its rights were prejudiced by Newman's representation of Walters in the trial on the merits, it may preserve that error for consideration on appeal from the judgment on the merits.
The petition for writ of mandamus is denied.
