With the new era of mobile computing, smartphones and tablets, wireless communications and cloud services, the USDA sought to take advantage of a mobilized workforce and the blurring lines between personal and corporate computing resources.
Sub ScheduleAppts() Dim ol As New Outlook.Application Dim ns As Outlook.Namespace Dim olFolder As Outlook.MAPIFolder Dim appt As Outlook.AppointmentItem Dim myRecipient As Outlook.Recipient NumberofRecipients = Range("L3").Value For i = 2 To NumberofRecipients test = Environ("username") Set ns = ol.GetNamespace("MAPI") Set ol = CreateObject("Outlook.Application") Set ns = ol.GetNamespace("MAPI") Set myRecipient = ns.CreateRecipient(test) myRecipient.Resolve Set olFolder = ns.GetSharedDefaultFolder(myRecipient, olFolderCalendar) Set appt = olFolder.Items.Add iDate = Range("A" & i & "").Value oDate = Range("B" & i & "").Value + 1 With appt .Start = iDate .End = oDate .Subject = Range("C" & i & "").Value .BusyStatus = olBusy .AllDayEvent = True .ReminderMinutesBeforeStart = 120 .ReminderSet = True .Save End With Set ol = Nothing Set ns = Nothing Set appt = Nothing Next i End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|testing a port being open in firewall||6||54|
|Need macro to assign two digit numbers to selected cells in Excel 2016||3||34|
|where can i download QDE (Quick Date Entry) add-in for Excel?||4||23|
|Assigning multiple macro in one command button||9||26|
Join the community of 500,000 technology professionals and ask your questions.