Was the workbook you ran the code from already saved on HD or was it a new one ?
Because for me it works fine. Try this one
Code:
Sub tst()
c00 = "D:\TempFile." & CreateObject("scripting.filesystemobject").getextensionname(ThisWorkbook.Name)
c01 = ThisWorkbook.FileFormat
MsgBox c00 & "," & c01
End Sub
In the messagebox you should see D:\Tempfile. then extension (xls,xlsm) then number (56,52)