Creating a meeting fails with invalid address while address of recipient is valid

wstaelens 26 Reputation points
2022-11-22T09:43:49.66+00:00

original question at: https://answers.microsoft.com/en-us/outlook_com/forum/all/creating-a-meeting-fails-with-invalid-address/d992fabf-b161-4952-859f-a50ed3a13d5d?messageId=e38799e1-b2c1-46ca-815c-0d182e41b6e0

Our application calls the local Outlook instance to create a meeting in the calendar.

C#:

Outlook.AppointmentItem appointment = (Outlook.AppointmentItem)folder.Items.Add( (int)Outlook.OlItemType.olAppointmentItem );   
appointment.MeetingStatus = Outlook.OlMeetingStatus.olMeeting;   
   
recipient = recipients.Add("foo.bar@mycompany.com");   
if (recipient.Resolve())    
{   
            appointment.Send();   
}   

A customer has a problem when using our application 4 out of 10 times they receive a message that the meeting does not have valid email addresses.

The question is:

Why does "recipient.Resolve()" sometimes fail?

For some customers we first have to call the Resolve() function before can create a meeting. In this case the .Resolve() fails and the customer is not able to create the meeting.

We add the recipient by email address (not name).
We've checked the email and the email is valid.

What could be the reasons that a Resolve fails?

Is there another way to create and send a meeting with the local outlook instance (other API calls?)?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
10,205 questions
Outlook Management
Outlook Management
Outlook: A family of Microsoft email and calendar products.Management: The act or process of organizing, handling, directing or controlling something.
4,873 questions
0 comments No comments
{count} votes