transfer text from cell to Task folder in Outlook

yosi

Board Regular
Joined
May 14, 2002
Messages
67
did someone knows how to transfer text from cell in sheet to the Task folder in Outlook ??
 

Some videos you may like

Excel Facts

What is the fastest way to copy a formula?
If A2:A50000 contain data. Enter a formula in B2. Select B2. Double-click the Fill Handle and Excel will shoot the formula down to B50000.

dk

MrExcel MVP
Joined
Feb 15, 2002
Messages
2,942
Hello,

This code shows how to create a new Outlook task. It just takes its Subject and Body from cell A1 and A2.

You must set a reference to the Microsoft Outlook Object Library before this will work.

Code:
Sub CreateTask()

'Create a new Outlook task in Excel VBA
Dim oOlookApp As Outlook.Application
Dim oOlookTask As Outlook.TaskItem

Set oOlookApp = CreateObject("Outlook.Application")

Set oOlookTask = oOlookApp.CreateItem(olTaskItem)

With oOlookTask
    .Subject = Range("A2").Value    'Take information from worksheet
    .Body = Range("A1").Value
    .DueDate = #12/11/2002#
    .Importance = olImportanceHigh
    .Save
End With

End Sub
 

Watch MrExcel Video

Forum statistics

Threads
1,122,841
Messages
5,598,388
Members
414,234
Latest member
grlevesq

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Top