H
han keat
Hi all, I want to sent parse the email header and send the info to excel
worksheet. I do this by writing a macro in Outlook to create a excel
object. However, I have problem killing the excel process, everytime
after I run the macro I have to manually go to task manager to end the
process. Could anyone please help me?
Thank you!! =)
Function array_to_excel()
Dim objApp As Application
Dim objDL As Object
Dim objExcel As Excel.Application
Dim objWB As Excel.Workbook
Dim objWS As Excel.Worksheet
Dim objRange As Excel.Range
Dim file_name As String
file_name = "E:\excel\email.xls"
Set objExcel = new Excel.Application
objExcel.Visible = True
Set objWB = objExcel.Workbooks.Open(FileName:=file_name)
Set objWS= objWB.Worksheets(1)
'do something
objWB.Save
objExcel.DisplayAlerts = False
objWS.SaveAs FileName:=file_name, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
objWB.Close
objExcel.DisplayAlerts = True
objExcel.Quit
Set objWS = Nothing
Set objWB = Nothing
Set objExcel = Nothing
End Function
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!
worksheet. I do this by writing a macro in Outlook to create a excel
object. However, I have problem killing the excel process, everytime
after I run the macro I have to manually go to task manager to end the
process. Could anyone please help me?
Thank you!! =)
Function array_to_excel()
Dim objApp As Application
Dim objDL As Object
Dim objExcel As Excel.Application
Dim objWB As Excel.Workbook
Dim objWS As Excel.Worksheet
Dim objRange As Excel.Range
Dim file_name As String
file_name = "E:\excel\email.xls"
Set objExcel = new Excel.Application
objExcel.Visible = True
Set objWB = objExcel.Workbooks.Open(FileName:=file_name)
Set objWS= objWB.Worksheets(1)
'do something
objWB.Save
objExcel.DisplayAlerts = False
objWS.SaveAs FileName:=file_name, FileFormat:= _
xlNormal, Password:="", WriteResPassword:="", _
ReadOnlyRecommended:=False, CreateBackup:=False
objWB.Close
objExcel.DisplayAlerts = True
objExcel.Quit
Set objWS = Nothing
Set objWB = Nothing
Set objExcel = Nothing
End Function
*** Sent via Developersdex http://www.developersdex.com ***
Don't just participate in USENET...get rewarded for it!