Setting Part Color

I am trying to set part colors using a macro and I am running into some issues. I figured I could record a macro of me going in and manually setting the appearance color and it would work great. However, when i do that the only code i get is this......


Sub main()

Set swApp = _
Application.SldWorks

Set Part = swApp.ActiveDoc
Dim myModelView As Object
Set myModelView = Part.ActiveView
myModelView.FrameState = swWindowState_e.swWindowMaximized
Part.ClearSelection2 True
End Sub

If anyone knows how to do this. Or if there is any other way to achieve this, I would appreciate any help.

Thanks.

SolidworksApi macros