Community
There's no worksurface.name
The only thing I can find is worksurface.surfacebodies.item(1).name and I get a declaration error if I try to alter that.
How do I change the name of a worksurface from srf4 to JoeBob?
What you're trying to do is correct. Whatever problem you're seeing must be because of a coding error, not because the API doesn't support it. I just tested it with the code below where workSurf is a variable declared as WorkSurface and has a reference to an existing work surface.
workSurf.SurfaceBodies.Item(1).name = "JoeBob"
After running the program, this is what I see in the browser.