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