Airbus had plans for an A330-200 Freighter, but these seem to have been shelved now - though whether this was for technical or economical reasons I don't know.
As for the A340, in my opinion the -200/300 versions wouldn't make the best freighters due to their size, but I think the A340-600 could make a reasonable freighter with it's large volume and good payload/range capability - possibly a good replacement for the heavier DC-8 freighters, the PAX version has a max payload of about 62,000 kg's.
In terms of the A340-500 I doubt anyone would want it as a freighter, even as a passenger aircraft it has little appeal, it was designed for VERY long range routes and IMO isn't really suitable for anything other than that.
In PAX form it carries only slightly more passengers than an A340-300 in typical config (around 10-15 more I think), carries less freight, burns more fuel and weighs a whopping 40 tons more when you compare the empty operating weights of the two aircraft, but has the same payload capability (around 50,000kg max payload). IMHO unless an airline wants to operate routes of greater than 6500-7000nm they'd be better off sticking with the A340-300, 40,000kg is lot of extra weight to be dragging around if you don't need it.
It's still a great looking aircraft though and being an A340 geek I think it's great all-round, and undoubtedly the best for the job when it comes to it's niche market of very, very, ultra, very long haul flights.
Just my opinion.
Statistically, people who have had the most birthdays tend to live the longest.