I have a 1Ds mkII and 30D both of which I still use as backups and can offer you some advice, though I've never used a 1D.
The 1Ds mkII was released in 2005 and feels very old now. The screen is small and difficult to see with low contrast and resolution, the menu system is bizarre and requires three hands to use efficiently, certain features from lower models of the same era you'd expect to have are missing (e.g. the ability to use the flash's AF assist lamp without the flash firing), for some unfathomable reason certain settings can only be altered by connecting the camera to a computer via firewire (USB wont do) card write speeds aren't great and whilst the frame buffer is large enough but takes ages to clear once full.
The image quality however is good, thanks to the large sensor and big pixels. So is the viewfinder and of course the 45 point autofocus system.
The 30D on the other hand has a bigger later generation screen, and generally more sane controls.
The 1D was released in 2001 and is really pretty long in the tooth now. I've never used one but imagine the menu system will be the same, probably minus even more features. It's also only APS-H and 4 megapixels isn't going to give you a lot of room to crop if you're making prints. The original battery probably wont have much life left in it and replacements could be rare.
Unless you really know what you're doing, or specifically need the AF or whether sealing I would go with the 40D, otherwise as you grow as a photographer you may find the 1D lacking. The 40D does a few things like live-view which depending on what you shoot can make the difference.