A slew of new store openings in its third quarter, coupled with strength in sales of prescription drugs, drove a better-than-expected 14% gain in profits at

Walgreen

(WAG)

.

The pharmacy chain said it earned $469.2 million, or 46 cents a share, for the quarter, up from the $411 million, or 40 cents a share, a year ago. Analysts on Wall Street were expecting earnings of 44 cents a share, according to consensus estimates reported by Thomson First Call.

Shares of Walgreen were recently up 26 cents, or 0.6%, to $43.87.

"We turned the corner in May on the impact of a mild flu season and are seeing more patients filling prescriptions under the Medicare drug benefit program," said Walgreen. "Many patients who couldn't afford to be compliant with their drug therapy before are now refilling their prescriptions more regularly. That helped pharmacy sales to trend up late in the quarter."

The company's sales rose 12% to $12.18 billion in the quarter, thanks in part to new store openings. It opened 112 new stores, compared with 87 in the year-ago period. In the first nine months of its fiscal year, it opened or acquired 334 stores, putting it on track to reach its goal of opening 475 stores in fiscal 2006, including about 390 net new stores after relocations and closings.

Meanwhile, those figures don't include Walgreen's recently announced acquisition of 76 Happy Harry's pharmacies that will merge with the company when that transaction closes in the coming weeks.

"We'll continue to evaluate other potential retail pharmacy acquisitions, but we'll pursue only those with a solid strategic fit, which are rare," said Walgreen.

With 5,251 drugstores in 45 states and Puerto Rico, most of Walgreen's growth still comes from organic expansion through new store openings, as opposed to the major acquisitions favored by its chief competitor,

CVS

(CVS) - Get Report

. In fiscal 2007, it expects organic growth of more than 400 net new stores after closings and relocations, with an overall expansion of 500 new stores.

"As we grow to 7,000 stores in 2010, we currently have about 1,300 approved new locations and thousands of additional targeted, potential sites throughout the U.S.," Walgreen said.

Factoring out its growth in store count, Walgreen posted a strong 7.6% gain in same-store sales, or sales at stores open at least a year, for its third quarter.

Prescription sales, which accounted for 65.2% of total sales at Walgreen, climbed 13.5% overall. Prescription sales in drugstores open at least a year rose 9.3% in the quarter, while the number of prescriptions filled at those stores rose 4% from last year. Third-party plans accounted for 93.5% of all prescription sales in the quarter.

As a result of the growth in lower-margin sales of prescription sales, the company's gross profit margins declined 39 basis points to 27.5% sales. That was partially offset by the introduction of new, higher-margin generic drugs -- a trend that's expected to continue into 2007 as more name-brand drugs become vulnerable to generic competitors.

Also, selling, occupancy and administration expenses decreased 25 basis points to 21.9% sales, reflecting lower legal and digital photo-conversion expenses.

"We're benefiting from the digital photo explosion, thanks to our convenient locations and technology that allows customers to upload photos to virtually any Walgreens store of their choice and pick them up in as little as an hour," said Walgreen. "With our Walgreens.com photo Web site and partnerships with online photofinishers including

Hewlett-Packard's

(HPQ) - Get Report

Snapfish and AOL, digital-photo orders increased nearly 50% from last year's third quarter and now comprise more than one-third of our one-hour photofinishing orders."