
February 11th, 2003, 09:49 AM
|
|
Junior Member
|
|
Join Date: Jan 2003
Location: NJ
Posts: 2
Time spent in forums: < 1 sec
Reputation Power: 0
|
|
|
How do I find out what type of a file was saved
I an using the below code to Save a file on my system that was saved in a mail message. And then open it up. Problem if it is Excel It gets closed before anybody sees it . I need to know what type it is so I do not close or hide the Excel application . How do I do it???
vntFilename = objExcel.GetSaveAsFilename(Attachments(objItem.ListIndex + 1).FileName)
If vntFilename <> False Then
Attachments(objItem.ListIndex + 1).SaveAsFile(vntFilename)
objExcel.Visible = False
objExcel.ScreenUpdating=False
objExcel.Visible = False
Set xlWB = objExcel.Workbooks.Add
objExcel.Visible = False
objExcel.ActiveWorkbook.FollowHyperlink vntFilename,,True
objExcel.Visible = False
set xlWB = nothing
End If
objExcel.Quit 'close excel application
Set objExcel = Nothing
Set objItem = Nothing
|