Assistance with Deprecated .Links Property

Status
Not open for further replies.

Bob C

Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Ok. With some help from smart folks on here, I am slowly tracking down some longstanding issues with my outlook forms. My next (last?) hurdle is hot to replace a deprecated property in my script. Here is the section I need assistance with:

Sub cmdMakeAppt_Click()
Const olAppointmentItem = 1
Set objAppt = Application.CreateItem(olAppointmentItem)
If Item.Size = 0 Then
Item.Save ' must save item before adding link
End If
With objAppt
.RequiredAttendees = "person@123.com"
.Subject = "In Home Consultation with " & Item.FullName
.Location = Item.BusinessAddressStreet & " " & Item.BusinessAddressCity & " " & Item.BusinessAddressState & " " & Item.BusinessAddressPostalCode
.Start = Item.UserProperties("Consult Date").value
.Duration = 90
.Body = Item.UserProperties("DirectionsText") & vbCr & vbLf & Item.HomeTelephoneNumber & vbCr & vbLf & Item.MobileTelephoneNumber & vbCr & vbLf & Item.UserProperties("Consult Notes") & vbCr & vbLf & vbCr & vbLf & Item.UserProperties("Breed") & vbCr & vbLf & Item.UserProperties("Pet Name")
.Links.Add Item
End With
objAppt.Display
Set objAppt = Nothing
End Sub


It seems Microsoft deprecated the .Links property. This whole subroutine is supposed to, when a botton in clicked, add an appointment to my calendar. Can anyone assist with a replacement for the .Links property?
 

Bob C

Member
Outlook version
Outlook 2016 64 bit
Email Account
Exchange Server
Actually, I have no idea what the .Links.Add Item did. I just deleted it, and now everything works as needed. I am sure it did something, but 15 years ago is a loooong time.

Thank you sooo so much for your help. This has been plaguing me for 2 years now.
 
Status
Not open for further replies.
Top