
714 So.2d 1094 (1998)
BAYCON INDUSTRIES, INC. Appellant,
v.
J. Michael SHEA, individually, and Shea & Associates, P.A., Appellees.
No. 97-04589.
District Court of Appeal of Florida, Second District.
June 26, 1998.
*1095 Laurin E. Bryant of Black & Jung, P.A., Tampa, for Appellant.
Ronald R. Bidwell, Tampa; J. Michael Shea of Shea & Associates, P.A., Tampa, for Appellees.
GREEN, Judge.
Appellant, Baycon Industries, Inc., timely presents two issues, one of which requires reversal and remand.
Baycon Industries, Inc., filed an unsworn professional legal malpractice complaint against J. Michael Shea, and Shea & Associates, P.A., in response to which Shea filed an unsworn motion to dismiss contesting Baycon's standing to bring the suit. The motion to dismiss had attached to it several documents relating to an earlier bankruptcy proceeding involving Baycon as the debtor and a sale or discharge of the underlying claim by Baycon for which Shea is being brought to task.
The trial court treated these pleadings in the fashion of a summary judgment proceeding, thereby depriving both parties of traditional procedural opportunities provided by Florida Rule of Civil Procedure 1.510. The court dismissed the complaint, based upon documents attached to the motion to dismiss.
We are unable to conclude whether the error is harmless and therefore remand for further proceedings. A motion to dismiss is not a substitute for a motion for summary judgment, and in ruling on a motion to dismiss a complaint the trial court is confined to consideration of the allegations found within the four corners of the complaint. See Thompson v. Martin, 530 So.2d 495 (Fla. 2d DCA 1988).
Reversed and remanded.
ALTENBERND, A.C.J., and QUINCE, J., concur.
