This example generates a unique filename by using the Admin control for an unattended "Save As" operation in the Image Edit control.
Private Sub cmdUniqueFile_Click()
Dim strNewfile As String
Dim strPath as As String
'Pass the directory, template, and file extension for
'the new file.
strPath = "D:\image2"
strNewfile = ImgAdmin1.GetUniqueName(strPath, "test", "tif")
ImgEdit1.SaveAs strPath & "\" & strNewfile
End Sub