Quantcast
Channel: Active questions tagged excel - Stack Overflow
Viewing all articles
Browse latest Browse all 88206

Save Outlook appointment to specific folder

$
0
0

How do I save a new outlook appointment to the same folder as another appointment, for which I have the EntryID? The folder should be the same one that the "currentitem" appointment is saved to. I think I should then use the "item.move" function to set the folder, but I can't get it to work.

EntryID = Cells(ActiveCell.Row, 23)
Set myolApp = CreateObject("Outlook.Application")
Set NS = myolApp.GetNamespace("MAPI")
NS.Logon
Set CurrentItem = NS.GetItemFromID(EntryID)
Dim MyAppt As Outlook.AppointmentItem
Set MyAppt = Outlook.Application.CreateItem(olAppointmentItem)
With MyAppt
    .Move (NS.Folders(CurrentItem)) 'THIS IS WHERE I AM STUCK
    .Start = CurrentItem.Start
    .End = CurrentItem.End
    .AllDayEvent = False
    .Display
End With

Viewing all articles
Browse latest Browse all 88206

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>