delete a part of folder name

Hi everybody,

I'm new on the forum so may be i didn't search very well to find a previous discussion about it.

I would like to delete a part of my drawing folder name. For example a have : C:\Documents and Settings\Jean-Michel\11-0456\ and i only would like to keep "Bureau" wich is a file number whith the different part (file name). I have to delete Jean-Michel because it's a client name that i will convert into a client number after.

I found the solution to modify, delete and keep the right part with a string. But with the sheet property link of solidworks i get an object for the folder name (as show below) and i can't change the object into a string to modify it (I tried with the Cstr function).

Can somebody help me ?

Thank you

Sub main()

Set swApp = Application.SldWorks

Set Part = swApp.ActiveDoc

Dim myNote As Object

Part.ClearSelection2 True

Set myNote = Part.SelectionManager.GetSelectedObject5(1)

Dim myAnno As Object

If Not myNote Is Nothing Then

   Set myAnno = myNote.GetAnnotation()

   myAnno.SetStyleName ""

End If

Dim myAnnotation As Object

Dim myTextFormat As Object

Set myNote = Part.InsertNote("\$PRP:""SW-Nom du dossier(Folder Name)""")

SolidworksApi macros