It's not easy being a wonder vitamin these days. Just when it looks like you're the solution to every health problem, some doctors come along and burst your bubble. Now it's happening to vitamin D.

The supplement has been widely promoted to prevent osteoporosis and fight a host of other ills. But recent studies haven't found much benefit, for bones or for general health.

This latest review looks at 23 randomized controlled trials involving more than 4,000 people to study vitamin D's effect on bones. Vitamin D, which is converted into a hormone by the body, makes it easier for us absorb calcium in the intestines. So it's easy to presume that more "D" would lead to stronger bones.

But this review found that for middle-aged people, taking vitamin D supplements for two years didn't affect bone mineral density in the spine, hip, arm bone and skeleton overall. They did find increased bone density in the neck of the femur bone, where it often breaks in the elderly. The review also found no relation between bone density and taking calcium supplements, people's overall vitamin D levels, length of treatment or age.

The conclusion? "Continuing widespread use of vitamin D for osteoporosis prevention in community-dwelling adults without specific risk factors for vitamin D deficiency seems to be inappropriate," the researchers wrote. The review was published online in The Lancet.

It could be that bone mineral density in middle-aged women is a poor predictor of who will eventually have osteoporosis, according to an accompanying commentary by Dr. Clifford Rosen, an osteoporosis researcher at the Maine Medical Institute. But two other recent analyses also found that vitamin D didn't help prevent fractures.

Or it could be that vitamin D and calcium need to be taken together, and that they help only when a person is really low on either or both.

Recent research on vitamin D's role suggests that as long as there's enough calcium circulating in the body, adding D doesn't send more calcium to the bones. It's only when someone's lacking circulating calcium, from food or supplements, that the body steals it from the bones.

That finding, Rosen writes, suggests that supplementing both vitamin D and calcium could help prevent hip fractures in the elderly, but probably doesn't build up bones in healthy middle-aged people.

That's pretty much the tack taken by the Institute of Medicine. In 2010, the independent body, which sets federal guidelines for dietary intake, determined that children and adults need 600 international units of vitamin D daily. People over age 70 need 800 IU, the institute recommended.

The body makes its own vitamin D when the skin is exposed to sunlight. Some foods — notably fatty fish — contain vitamin D, and others like milk, are routinely fortified with D.

But advocates of high-dose vitamin D say that taking high doses of supplemental D — 1,000 to 4,000 IU a day — can prevent cancer, heart disease and other chronic diseases. The Institute of Medicine said there's no evidence that's true.

The panel also found no evidence of widespread vitamin D deficiency in Americans.

The U.S. Preventive Services Task Force, an independent group that advises the government on evidence-based medical treatments, is looking into the broader health effects of vitamin D supplements, so stay tuned.

Copyright 2016 NPR. To see more, visit http://www.npr.org/.