-1

I am using outlook 2013 and the below code gives me the error as given in the below screen shot.

Sub Testing()
    Dim olApp   As Outlook.Application
    Dim olNS    As Outlook.Namespace
    Dim olFol   As Outlook.Folder
    Dim abc
    Set olApp = New Outlook.Application
    Set olNS = olApp.GetNamespace("MAPI")

    'Set olFol = olNS.PickFolder

    Set abc = olNS.Folders.Item("Mailbox@domain.com")



End Sub

Error details is given below.

Run Time error '-2147221163 (80040155)'

Method 'Folders' of object '_NameSpace' failed

I have tried a lot of combination. this works in 2007 and below version.

Martijn Pieters
  • 1,048,767
  • 296
  • 4,058
  • 3,343
  • I've just tried that in 2013 and it worked fine. Could it be the reference to the Outlook type library? What version of the Outlook lib are you referencing? – simon at rcl Mar 20 '14 at 14:31

2 Answers2

0

The error is REGDB_E_IIDNOTREG.

Is this a click-to-run Outlook 2013 installation?

Dmitry Streblechenko
  • 62,942
  • 4
  • 53
  • 78
0

I had done a re install of the Outlook 2013 and the same is now working.