aspiringnerd
New Member
- Joined
- Apr 22, 2022
- Messages
- 39
- Office Version
- 365
- Platform
- Windows
I have a function that copies a dynamic range to my clipboard, is it possible to set .body equal to my clipboard? I'm currently manually pasting it into the body of the outlook event
VBA Code:
Sub new_event()
Set olOutlook = CreateObject("Outlook.Application")
Set Namespace = olOutlook.GetNameSpace("MAPI")
Set oloFolder = Namespace.GetDefaultFolder(9)
Set Appointment = oloFolder.items.Add
With Appointment
.AllDayEvent = True
.Start = Cells(ActiveCell.Row, "T").Value
.End = Cells(ActiveCell.Row, "U").Value
.Categories = Cells(ActiveCell.Row, "V").Value
.Subject = Cells(ActiveCell.Row, "W").Value
'.Body = selectandcopy 'selectandcopy is a function that copies a dynamic range my clipboard, im currently manualy pasting the clipboard, is it possible to automate this task?
.Display
End With
End Sub