Sending Outlook Meeting Invite via Excel

crug

Board Regular
Joined
Jan 14, 2006
Messages
56
I have access to a shared mailbox and send emails (CreateObject("Outlook.Application") using the StringFrom property from a shared mailbox successfully.

Using the (Set objAppt = objOL.CreateItem(olAppointmentitem) (objAppt.MeetingStatus = olMeeting)

Is there a property to send the meeting invite from a shared mailbox?

Thank you all in advance
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Try adapting this final working code from Creating an Outlook Appointment in a shared calendar (post 13 onwards) with your specific shared mailbox name/email address:
VBA Code:
Private Sub Meeting_Invite_Shared_Mailbox()

    Dim olApp As Outlook.Application
    Dim outNameSpace As Namespace
    Dim outSharedName As Outlook.Recipient
    Dim outCalendarFolder As MAPIFolder
    Dim olAppItem As Outlook.AppointmentItem
    Dim SharedMailboxEmail As String

    SharedMailboxEmail = "DSSTest@companyname.com"

    Set olApp = GetObject("", "Outlook.Application")
    On Error GoTo 0
    If olApp Is Nothing Then
    On Error Resume Next
    Set olApp = CreateObject("Outlook.Application")
    On Error GoTo 0
        If olApp Is Nothing Then
            MsgBox "Outlook is not available!"
            Exit Sub
        End If
    End If
   
    Set outNameSpace = olApp.GetNamespace("MAPI")
    'Start at Namespace and get the DSSTest/DSSTest@companyname.com data file folder (whichever works)
    'Either
    Set outCalendarFolder = outNameSpace.Folders("DSSTest")
    'or
    Set outCalendarFolder = outNameSpace.Folders("DSSTest@companyname.com")
    
    'Get the calendar within DSSTest/DSSTest@companyname.com
    Set outCalendarFolder = outCalendarFolder.Folders("Calendar")
    'Confirm correct calendar
    Debug.Print outCalendarFolder.Name, outCalendarFolder.FolderPath

    'Create new appointment in DSSTest calendar
    Set olAppItem = outCalendarFolder.Items.Add(olAppointmentItem)

    With olAppItem
        ' set default appointment values
        .Location = "XXXX"
        .ReminderSet = True
        .BusyStatus = olBusy
        .RequiredAttendees = "XXXX"
        .MeetingStatus = olMeeting
        On Error Resume Next
        .Start = Date
        .Duration = 60
        .Subject = "Subject"
        .Body = "Body text"
        .ReminderSet = True
        .ReminderMinutesBeforeStart = 15
        .BusyStatus = olBusy
        On Error GoTo 0
        .Display ' saves the new appointment to the default folder
    End With
        
End Sub
 
Upvote 0
Thankyou for your reply, I still cant get this to work, I wondering if its not a true shared calendar
 
Upvote 0

Forum statistics

Threads
1,223,912
Messages
6,175,340
Members
452,638
Latest member
Oluwabukunmi

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top