I feel your pain, everyday.
I have been trying to write a script to "crop" to selected artwork for some time.
For production I just save BACK to goodol' CS3, and use the "CROP TOOL" to crop to selected artwork.
Hey Adobe, can you BRING BACK THE CROP TOOL YOU HAD IN CS3 IN YOUR NEXT CS5.
Seems like a lot of people can use it.
Ummm... I may be off withthis... but if you export an artboard as a jpeg or what not.... there is an option at the bottom that allows you to choose range of artboards to export.. when you choose a single artboard to export(instead of lets say artboards 1-4), it automatically crops the artboard to the artoboard bounds and exports the image correctly, with just the selected artboard. I never have to crop after doign this little method
Does this help anyone?:
You can automatically create a new Artboard to fit precisely around any object by 1. Selecting the object, 2. Selecting the Artboard Tool, and then 3. Clicking on the object with the Artboard Tool. A new artboard will appear which wraps tightly around your object. Your old artboard will still be there, but you can zap it right away since the Artboard Tool is still active, or you can just note the Artboard number for when you go to export.
It's not a perfect solution, but nothing ever is with Adobe Illustrator.
When I used Corel Draw I could simply select anything and export it and the result would be cropped to the object.
Sigh.
You can actually record an action in Illustrator that resizes the artboard to, for example, "fit to artwork bounds."
1) Record your action (you will see that Illustrator does NOT record your artboard resize the first time around).
2) Once you've finished recording the action, select that action in the palette.
3) Then from the action palette menu select "insert menu item." A popup window will open. Once it does, you can then go back to the menu item to select "fit to artwork bounds" and it will physically insert your menu item into your custom Illustrator action.
{using Illustrator CS5 on a Mac)
North America
Europe, Middle East and Africa
Asia Pacific