"Everything that can be invented has been invented"
- Attributed to Charles H. Duell, Commissioner of the United States Patent and Trademark Office, 1899
That the commissioner of such an office should resign from his post for such a reason doesn't sound very probable - why it hasn't generated more skepticism than it has is a mystery. Here's what one librarian found, his prime source being an article published in 1940 by Dr. Eber Jeffery:
Jeffery found no evidence that any official or employee of the U.S. Patent Office had ever resigned because he thought there was nothing left to invent. However, Jeffery may have found a clue to the origin of the myth. In his 1843 report to Congress, the then-commissioner of the Patent Office, Henry L. Ellsworth, included the following comment: "The advancement of the arts, from year to year, taxes our credulity and seems to presage the arrival of that period when human improvement must end." As Jeffery shows, it's evident from the rest of that report that Commissioner Ellsworth was simply using a bit of rhetorical flourish to emphasize that the number of patents was growing at a great rate. Far from considering inventions at an end, he outlined areas in which he expected patent activity to increase, and it is clear that he was making plans for the future.
Additionally, Bengt-Arne Vedin writes (in a Swedish journal) about a tounge-in-cheek article from 1837, about an employee of the office who resigned since nothing was left to invent.
No one has been able to verify the Duell quote, from 1899 or any other year. It abounds in secondary sources, but no primary ones.
Charles Duell wasn't commissioner for very long. He was suggested for the post in January 1898 and resigned in March 1901. The reason was no actual or foreseen shortage of filed patents, but quite the opposite:
Mr. Duell's purpose in resigning is said to be that he may be able to devote his entire time to his patent business. The salary of the Commissioner of Patents is $5,000 a year, but Mr. Duell's patent practice, when he is able to give it his entire attention, is understood to be considerably above that figure, so that there is no financial consideration which would warrant him in retaining the office.
New York Times, July 30 1900
The quote is not only wrong, but out of place; the late 19th century was indeed a time of optimism, of all kinds.
It is no longer true that "Science moves but slowly, creeping on from point to point." For centuries it crept; then it marched, then ran, and now it flies on the wings of the lightning. A new year means a new world.
Leader in New York Tribune, January 1 1880