The below code works, locally, and that would be great if all users were running the application on their personal computers, however, users are logging into a Remote Desktop to access the application, and therein lies the dilemma. The Outlook Reminder is saving to the Remote Desktop calendar, not the local user's calendar.
I'm wondering if it is possible to force the Outlook Reminder to .Save to their local machine instead of the Remote Desktop?
In previous applications I have directed the .Save of an Excel file to a folder on the network, rather than saving it to the Remote Desktop. I'm hoping there is a similar trick floating around out there in someone's head.
Private Sub CreateAppointment()
Dim outlookReminderSubject, outlookReminderBody As String
Dim outlookReminderDate As String = Me.dtpOutlookReminderDate.Value
outlookReminderDate = outlookReminderDate.Split(" "c)(0)
Dim outlookReminderTime As String = Me.dtpOutlookReminderTime.Value
outlookReminderTime = outlookReminderTime.Split(" "c)(1) & " " & outlookReminderTime.Split(" "c)(2)
outlookReminderSubject = Me.txbxOutlookReminderSubject.Text
outlookReminderBody = Me.txbxOutlookReminderBody.Text
Dim TempApp As Outlook.Application = New Outlook.Application()
Dim TempAppItem As Outlook.AppointmentItem = TempApp.CreateItem(Outlook.OlItemType.olAppointmentItem)
TempAppItem.Subject = outlookReminderSubject
TempAppItem.Body = outlookReminderBody
TempAppItem.Start = Convert.ToDateTime(outlookReminderDate & " " & outlookReminderTime)
TempAppItem.ReminderSet = True
TempAppItem.ReminderMinutesBeforeStart = 15
TempAppItem.BusyStatus = Outlook.OlBusyStatus.olBusy
TempAppItem.IsOnlineMeeting = False
TempAppItem.Save()
TempApp = Nothing
TempAppItem = Nothing
MsgBox("Outlook reminder created for " & outlookReminderDate & " at " & outlookReminderTime)
End Sub
Back-up plan is to attempt to teach Outlook on the Remote Desktop to accept the Reminder, and then forward it to original creator as a calendar "invite," but that feels like cheating the system.
-Goodge