how about doing this instead...
Open up your bag, whichever one has the dynamite. Click and hold on the Dynamite and drag it down to your action bar, in whichever location you like best. Now do the same for any other item that you want to be able to use quickly, such as healing potions. Now, when you want to use the dynamite, click on the icon that you put on your action bar, aim the dynamite to where you want it to go, and presto. You have a quick way of throwing dynamite.
It might also help to go into the interface options (press escape once) and make it to where another action bar is on the screen, (i use both bottom action bars) this lets you have multiple action bars on screen at once, eliminating the need for shifting between them. Now, the only problem that you might have for this is that it can clutter up the screen.
As far as a macro, I do not know of any macro that would let you use dynamite, because you have to aim it as well, it is much easier to drag the dynamite to your action bar, just like you do with your spells.