Hi, I've been using something similar to this post
to create task items, but it's a little funky after a decade. So I'm using your example directly.
It works great for making tasks from emails. I cannot get it to correctly make a task from an appointment. The appointment body/notes won't copy to the clipboard for pasting.
When class=olmail, objWord = "Microsoft Word", objSel populates and the task is created correctly.
When class=olAppointment, objWord = "Microsoft Word" , but objSel remains Nothing.
A task is created and the macro steps correctly to completion, but the task body is populated with the previous clipboard contents. What am I missing, or, how do I get the body of an AppointmentItem to the clipboard?
Thank you
Create Task or Appointment and Insert Selected Text
An Outlook user wanted to know how to create a task from an email message but only include the actionable part of the message in the task. Easy: drag the selection to the Task or Calendar folder or use a macro.
www.slipstick.com
It works great for making tasks from emails. I cannot get it to correctly make a task from an appointment. The appointment body/notes won't copy to the clipboard for pasting.
When class=olmail, objWord = "Microsoft Word", objSel populates and the task is created correctly.
When class=olAppointment, objWord = "Microsoft Word" , but objSel remains Nothing.
A task is created and the macro steps correctly to completion, but the task body is populated with the previous clipboard contents. What am I missing, or, how do I get the body of an AppointmentItem to the clipboard?
Code:
If Not objMail Is Nothing Then
If objMail.Class = olMail Then
Set objInsp = objMail.GetInspector
If objInsp.EditorType = olEditorWord Then
Set objDoc = objInsp.WordEditor
Set objWord = objDoc.Application
Set objSel = objWord.Selection
With objSel
.WholeStory
.Copy
End With
End If
ElseIf objMail.Class = olAppointment Then
Set objInsp = objMail.GetInspector
If objInsp.EditorType = olEditorWord Then
Set objDoc = objInsp.WordEditor
Set objWord = objDoc.Application
Set objSel = objWord.Selection
With objSel
.WholeStory
.Copy
End With
End If
End If
End If
Thank you