Creating Outlook Task from Excel

B

Bugman

Building on this same principle... I would like to copy and paste a selection
of visible cells (meaning some columns could be hidden) into the Body of a
task. I would also like to keep the MS Office Excel Worksheet format. I have
the following code:

Sub ScheduleTask()
Dim OLF As Outlook.MAPIFolder
Dim olTaskItem As Outlook.TaskItem

Set OLF = GetObject("", "Outlook.Application").GetNamespace
"MAPI").GetDefaultFolder(olFolderTasks)
Set olTaskItem = OLF.Items.Add ' creates a new task
With olTaskItem
.Subject = ActiveCell.EntireRow.Cells(1, 1).Value
.DueDate = #2/1/2008#
.ReminderTime = #1/21/2008 1:00:00 PM#
.ReminderSet = True
.Body = ???

.Save
End With
Set olTaskItem = Nothing
Set OLF = Nothing

End Sub
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top