The operation failed because of a registry or installation problem. Restart Outlook and try again.
I got an error "The operation failed because of a registry or installation problem. Restart Outlook and try again." on the last line of this simple procedure trying to execute .GetSharedDefaultFolder method:
Public Sub xxx(Email As String, Subject As String, StartTime As Date, Duration As Integer)
Dim x As Outlook.Application, NameSpace As Outlook.NameSpace
Dim Folder As Outlook.MAPIFolder
Dim Recipient As Outlook.Recipient
Dim Appt As Outlook.AppointmentItem
Dim App As Outlook.Application
Set x = CreateObject("Outlook.Application")
Set NameSpace = x.GetNamespace("MAPI")
Set Recipient = NameSpace.CreateRecipient(Email)
Recipient.Resolve
If Not Recipient.Resolved Then acMsgBox "Unable to contact email account " & Recipient: Exit Sub
Set Folder = NameSpace.GetSharedDefaultFolder(Recipient, olFolderCalendar)