Extracting drawings to .JPG format

I have been tasked with extracting drawings from a given document and converting them to a series of .JPG images.  The documents contain two or more sheets, the first sheet being the master drawing and all the following sheets being one or more variations on that master drawing (configurations).  Is there a way, using VB.NET and the API calls, to iterate through the sheets contained in a given document and save the drawing to a jpg file?  Any guidance or help with this project would be greatly appreciated!

SolidworksApi macros