Experts Exchange connects you with the people and services you need so you can get back to work.
Dim objApp As Outlook.Application
Dim objNS As Outlook.NameSpace
Dim objFolder As Outlook.MAPIFolder
Dim objDummy As Outlook.MailItem
Dim objRecip As Outlook.Recipient
Dim objInvite As Outlook.Recipient
Dim objAppt As Outlook.AppointmentItem
Dim strMsg As String
Dim strName As String
On Error Resume Next
' ### name of person whose Calendar you want to use ###
strName = "email@example.com"
Set objApp = CreateObject("Outlook.Application")
Set objNS = objApp.GetNamespace("MAPI")
Set objRecip = objNS.CreateRecipient(strName)
Set objFolder = objNS.GetSharedDefaultFolder(objRecip, olFolderCalendar)
If Not objFolder Is Nothing Then
Set objAppt = objFolder.Items.Add
If Not objAppt Is Nothing Then
.MeetingStatus = olMeetingRequest
.MeetingStatus = olMeeting
.Subject = "Donald Duck's Birthday"
.Start = "07/03/2009 17:00:00"
.Body = "YOU ARE A WINNER"
.Duration = 1400
.Location = "France Paris"
.ReminderMinutesBeforeStart = 60
.BusyStatus = olTentative
.RequiredAttendees = "firstname.lastname@example.org"
Set objApp = Nothing
Set objNS = Nothing
Set objFolder = Nothing
Set objDummy = Nothing
Set objRecip = Nothing
Set objAppt = Nothing
Open in new window
Easily upload multiple users’ photos to Office 365. Manage them with an intuitive GUI and use handy built-in cropping and resizing options. Link photos with users based on Azure AD attributes. Free tool!
Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.
Have a better answer? Share it in a comment.
Please enter a first name
Please enter a last name
Must be at least 4 characters long.
Join and Comment
From novice to tech pro — start learning today.
Premium members can enroll in this course at no extra cost.
Premium members get this course for $174.99.
Premium members get this course for $62.50.
Premium members get this course for $159.20.
Premium members get this course for $31.25.
Premium members get this course for $168.80.