'======================================== Function xGen_GetTempFile 'This function generates a unique temporary file name 'In the windows temporary folder 'Usage: 'sFileName = xGen_GetTempFile Dim oFso, oTempFolder Const TemporaryFolder = 2 Set oFso = CreateObject("Scripting.FileSystemObject") 'Get the path to the windows temporary folder Set oTempFolder = oFso.GetSpecialFolder(TemporaryFolder) 'Return the windows temporary folder path and the unique temporary file name xGen_GetTempFile = oTempFolder.Path & "\" & oFso.GetTempName Set oTempFolder = Nothing Set oFso = Nothing End Function '========================================