aryanaveen
Board Regular
- Joined
- Jan 5, 2015
- Messages
- 104
HI All
Please help me with below code
I have below code which is working fine without "SentOnBehalfOfName". the code setups a meeting invite from my default mailbox. I want to setup invite from a specific mailbox for which I have access but when I use "SentOnBehalfOfName" I get run time error 438, object doesn't support this property or method. can someone please help me with this
Sub Setupinvite()
Dim OutApp As Object
Dim Outmail As Object
Dim cell As Range
Application.ScreenUpdating = True
Set OutApp = CreateObject("Outlook.Application")
Set Outmail = OutApp.CreateItem(1)
Range("B16").Font.Bold = True
With Outmail
.SentOnBehalfOfName = "ABC@ABC.com" --------------------------This is where I am getting run time error, without this line macro setups meeting with my default ID
.MeetingStatus = olMeeting
.RequiredAttendees = Range("B2").Value
.Subject = Range("B3").Value
'.BodyFormat = olFormatRichText
.Start = Range("B5").Value
.Location = "Skype call-Internal Note-"
.Duration = 60 ' 1 hour meeting
.BusyStatus = 2 ' set as free
.ReminderSet = True 'reminder set
.ReminderMinutesBeforeStart = "15" 'reminder 2 weeks before
.Display
Please help me with below code
I have below code which is working fine without "SentOnBehalfOfName". the code setups a meeting invite from my default mailbox. I want to setup invite from a specific mailbox for which I have access but when I use "SentOnBehalfOfName" I get run time error 438, object doesn't support this property or method. can someone please help me with this
Sub Setupinvite()
Dim OutApp As Object
Dim Outmail As Object
Dim cell As Range
Application.ScreenUpdating = True
Set OutApp = CreateObject("Outlook.Application")
Set Outmail = OutApp.CreateItem(1)
Range("B16").Font.Bold = True
With Outmail
.SentOnBehalfOfName = "ABC@ABC.com" --------------------------This is where I am getting run time error, without this line macro setups meeting with my default ID
.MeetingStatus = olMeeting
.RequiredAttendees = Range("B2").Value
.Subject = Range("B3").Value
'.BodyFormat = olFormatRichText
.Start = Range("B5").Value
.Location = "Skype call-Internal Note-"
.Duration = 60 ' 1 hour meeting
.BusyStatus = 2 ' set as free
.ReminderSet = True 'reminder set
.ReminderMinutesBeforeStart = "15" 'reminder 2 weeks before
.Display