Hello
I have a code below to import my inbox to excel, but i am getting the following error
Private Sub Application_Startup()
Dim Test
'Const FilePath As String = "file:///C:\Users\DjOweriman\Documents\My%20WCEN%20Email_Vault.xlsm"
Dim outlookApp As Outlook.Application
Dim objectNS As Outlook.NameSpace
Set outlookApp = Outlook.Application
Set objectNS = outlookApp.GetNamespace("MAPI")
Set inboxItems = objectNS.Folders("owen@wcen.org.uk-Outlook").Folders("Inbox").Items
Can anyone help?
Thanks
I have a code below to import my inbox to excel, but i am getting the following error
Private Sub Application_Startup()
Dim Test
'Const FilePath As String = "file:///C:\Users\DjOweriman\Documents\My%20WCEN%20Email_Vault.xlsm"
Dim outlookApp As Outlook.Application
Dim objectNS As Outlook.NameSpace
Set outlookApp = Outlook.Application
Set objectNS = outlookApp.GetNamespace("MAPI")
Set inboxItems = objectNS.Folders("owen@wcen.org.uk-Outlook").Folders("Inbox").Items
Can anyone help?
Thanks