How many files you looking to convert? If not many then might not be worth spending time on the macro.
You can select and drag them all on the open SW window. And then can quickly change the display state, save and close.
Here are codes if you still need them(you would to modify them). These can be made to run in batch mode also where macro would open the STEP files in the specified lcoation, set the option and save them as part file with same name in same location.
Dim swApp As SldWorks.SldWorks
Dim swModel As SldWorks.ModelDoc2
Set swApp = Application.SldWorks
swApp.LoadFile2 "Step File Full path with extension", "r"
Set swModel = swApp.ActiveDoc
swModel.ActiveView.DisplayMode = swViewDisplayMode_e.swViewDisplayMode_ShadedWithEdges
swModel.SaveAs3 "File Save Full path with extension", 0, 2
It is my verification process for our document control system. I currently do drag, drop, change display state, and save. It just seems so redundant that an icon marco may help. I download our current files and the proposed files, then overlay them to be sure only the required changes were made. It is 12 files every time a new revision comes through. Today it is 36 files, next week could be 0, and the following could be 20. I have VERY limited experience with macros so I don't have a clue how long it would take to write one. My inclination is that it would take 5 minutes or so but if I am way off base it may not be worth the time.
Check my updated reply above.
Batch mode would be great. Any steps that can be combined into one button will help!
You're missing one line plus in save as line, extension should SLDPRT and not STEP
Check the batch mode macro in above post.