Multiple page Macro

I am creating a macro with multiple pages, each page shows properties of part, assembly and drawing.

Please see the sample below.

Can someone please tell me whether it is possible to go to particular pages when it is played, depends on the type of document?

If so, please modify the attached macro

For Example:

When I run this macro with a part file open, it should show page 1 (part) and it should show page 3 (drawing) if I run it with a drawing file open.

Thanks,

JOHN

SolidworksApi macros