“We have never said and would never say that a pharmaceutical pen or notebook has influenced any prescription,” Ms. Bieri said.

But some critics said the code did not go far enough to address the influence of drug marketing on the practice of medicine. The guidelines, for example, still permit drug makers to underwrite free lunches for doctors and their staffs or to sponsor dinners for doctors at restaurants, as long as the meals are accompanied by educational presentations.

Image Just a few of the free pens in Dr. Jeffrey F. Carens collection. Credit... J. Emilio Flores for The New York Times

“Pens or no pens, their influence is not going to be diminished,” said Dr. Larry M. Greenbaum, a rheumatologist in Greenwood, Ind. He has made a point of collecting ballpoint pens advertising formerly heavily promoted medications, like the painkiller Vioxx, that were later withdrawn after reports of dangerous side effects.

Last year, besides giving away nearly $16 billion in free drug samples to doctors, pharmaceutical companies spent more than $6 billion on “detailing”  an industry term for the sales activities of drug representatives including office visits to doctors, meal-time presentations and branded pens and other handouts, according to IMS Health, a health care information company.

The industry code also permits drug makers to pay doctors as consultants “based on fair market value”  which critics say means that companies can continue to pay individual doctors tens of thousands of dollars or more a year.

“We have arrived at a point in the history of medicine in America where doctors have deep, deep financial ties with the drug makers and marketers,” said Allan Coukell, the director of policy for the Prescription Project, a nonprofit group in Boston working to promote evidence-based medicine. “Financial entanglements at all the levels have the potential to influence prescribing in a way that is not good.”