The operation failed because of a registry or installation problem. Restart Outlook and try again.

Hugh Banyon 0 Reputation points
2024-07-18T18:50:10.17+00:00

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)

Outlook
Outlook
A family of Microsoft email and calendar products.
3,812 questions
Access
Access
A family of Microsoft relational database management systems designed for ease of use.
389 questions
Office Development
Office Development
Office: A suite of Microsoft productivity software that supports common business tasks, including word processing, email, presentations, and data management and analysis.Development: The process of researching, productizing, and refining new or existing technologies.
3,895 questions
{count} votes

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.