Save as Configuration Macro

Hi,

I am trying to save my part using a Tool Number in "Summary Information, Configuration Specific" but I cant get this Macro to work, it only saves as "TN".

Sub main()

Dim swApp As SldWorks.SldWorks

Dim SWmoddoc As SldWorks.ModelDoc2

Dim partnumber As String

Set swApp = Application.SldWorks

Set SWmoddoc = swApp.ActiveDoc

partnumber = SWmoddoc.CustomInfo("ToolNumber")

If (SWmoddoc.GetType = swDocPART) Then

    SWmoddoc.SaveAs ("TN" + partnumber + ".sldprt")
  

ElseIf (SWmoddoc.GetType = swDocASSEMBLY) Then

     SWmoddoc.SaveAs ("TN" + partnumber + ".sldasm")
    
ElseIf (SWmoddoc.GetType = swDocDRAWING) Then

     SWmoddoc.SaveAs ("TN" + partnumber + ".slddrw")

End If

End Sub

Please Help!!!!

SolidworksApi macros