I have a SharePoint 2007 document library of Word and Excel documents with several approval workflows associated with it. My question is whether it is possible at all to know whether it was the list item that was modified, or the document? I thought that the Version property could be used, but unfortunately this does not differentiate what was modified (list item fields or document).
You can compare the beforeProperties to the afterProperties with an EventReceiver: http://www.sharepointalex.co.uk/index.php/2010/06/beforepropertiesafterproperties-in-event-receivers-i-always-forget-this/
It looks like on a Library they actually work for ItemUpdated, so you could potentially use the EventReceiver to start your workflow or whatever...
Programmatically, or in the workflow?
In the workflow I don't think it makes a difference if the item or the file was modified, they both fire the "Start when item is modified" trigger.
In code, you might have a new SPFile.Version if the document itself was modified, you could check that. For sure you would see the differences in an EventReceiver, as it has both before and after properties. So as a possible work around you could fire your workflow from there (or work out a nice interface where you can hook workflows on those more specific triggers)
You can create a extra column to store the hash of the document. You can compare the hash of document when the item is modified to the previous value using an event receiver.
If both the hash don't mach, the document is modified for sure. ( Note: The hash will change even if you insert a space in document)