Hi guys,
I've written a macro in outlook that will extract the data from email body and copy it across excel spreadsheet. It's giving me below error:
run-time error '-214748111 (80010001)':
automation error
Call was rejected by callee.
Please see below the code:
Any help will be much appreciated.Public Sub Extract() On Error Resume Next Set myOlApp = Outlook.Application Set mynamespace = myOlApp.GetNamespace("mapi") Dim strRowData As String Dim strDelimiter As String Dim myDestFolder As Folder Dim olMailbox As Folder Dim ShareInbox As Folder Dim SubFolder As Folder Dim InputFolder As String Dim OutputFolder As String Dim ProdMail As String Dim oXLApp As Object, oXLwb As Object, oXLws As Object Dim lRow As Long On Error Resume Next Set oXLApp = GetObject(, "Excel.Application") '~~> If not found then create new instance If Err.Number <> 0 Then Set oXLApp = CreateObject("Excel.Application") End If Err.Clear On Error GoTo 0 '~~> Open the relevant file Set oXLwb = oXLApp.Workbooks.Open("X:\Test1.xlsx") 'Extract Mailbox and subfolder details from a sheet named as "Folder Details" Set oXLws = oXLwb.Sheets("Folder Details")
Thanks