Splitting Multiple Page Drawings into Separate Drawings

Hi everyone,

I am trying to split a drawing with 34 sheets into 34 drawings with 1 sheet in each.  I found this post on the forums: https://forum.solidworks.com/message/280031#280031 (as well as the referenced post).  The code in that thread works great on drawings with a few sheets.  But when I run it for my 34 sheet drawing, it makes 34 copies of the drawing, names the copies after the sheet that it is suppose to contain, but does not strip out the other sheets.  So I wind up with 34 drawings with 34 sheets.  I can't figure out why it works on drawings with 10 sheets and not a drawing with 34 sheets. 

Any suggestions?

Thanks,

Tara

SolidworksApi macros