An appeals court on Tuesday ordered Microsoft to stop selling Microsoft Word 2007 and other Office 2007 products by Jan. 11 because the software infringes on a patent held by a Canadian company. The judge also hit Microsoft with a $290 million fine.

In ruling, the U.S. Court of Appeals struck down Microsoft's appeal of a lower court's finding that Word 2007, the most current version of the product, infringes on a patent held by Toronto-based i4i Inc.

I4i originally sued Microsoft in 2007, claiming that an XML editor built into Word steps on its patent. In August, the U.S. District Court for Eastern Texas found in favor of i4i, prompting Microsoft's appeal. The appeals court on Tuesday upheld the Texas decision.

"In this case, a small company was practicing its patent, only to suffer a loss of market share, brand recognition, and customer goodwill as the result of the defendant's infringing acts," the court said in documents published Tuesday.

The ruling means Microsoft can't sell versions of Word that can open documents saved in the .XML, .DOCX, or .DOCM formats that contain custom XML.

Those formats were at the heart of the patent dispute. DOCX is the default format for the most current version of Word, which is included in Microsoft Office 2007. Custom XML is used by businesses to link their corporate data to Word documents.

The patent, No. 5,787,449, describes how programs go about "manipulating a document's content and architecture separately."

The court left an out for Microsoft. The company can continue to sell Word 2007 after Jan. 11 if it removes the offending technology from the product. Microsoft said it plans to do just that.

"With respect to Microsoft Word 2007 and Microsoft Office 2007, we have been preparing for this possibility since the District Court issued its injunction," the company said in a statement.

"Therefore, we expect to have copies of Microsoft Word 2007 and Office 2007, with this feature removed, available for U.S. sale and distribution by the injunction date," Microsoft said.

Microsoft Office, which includes Word, PowerPoint, and Excel, accounted for more than $3 billion in worldwide sales in Microsoft's most recent fiscal year and is used by literally millions of businesses and consumers for everyday tasks like word processing and creating spreadsheets and presentations.