<p>I am writing a macro for Visual studio that will generate some code.</p>

<p>I would like for the macro to generate for both C# and VB, is there a way to determine what language is being used in the active (current) document?</p>

Have you considered using
T4
?
T4 is a code generator built right into Visual Studio. If you're using C#, you'll have a sub .cs file, or if you're using VB, a sub .vb file. That's the file that will hold the result of the generation. This is the same visual metaphor used to the express the template/generated file relationship with .designer files you've seen elsewhere in Visual Studio.