You've gotta check your tranny fluid levels and make sure they are ok. If you don't have a dipstick, you're best off doing this at a workshop.
Also check your engine oil levels and make sure those are ok.
Do the stomp test and see if there are any useful error codes. Youtube for the stomp test, many easy to follow videos on that there.
Unplug your engine's coolant temperature sensor and see if this problem goes away. If it does, then replace the sensor.
Clean your throttle position sensor...it should be located next to the throttle body, or just below it. Cleans its connection too. Then plug that back and see if it helps.
Check your intake hoses for any cracks or any vacuum leaks. Tighten all intake hose connections.
Download the E34 Bentley manual (google for the download links) and read through the engine troubleshooting guides to see if you can narrow down the problems.
Please read through the maintenance sticky thread at the top of these forums for more exhaustive information.
I'm sorry to be so general in this reply but your symptoms are not straightforward to diagnose (at least for the E34) and require a thorough check. Oddly enough, we've had a few of such cases in the past 2 days too.
Last edited by robertobaggio20; 11-11-2012 at 05:15 PM.