Home |
Search |
Today's Posts |
|
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Hi Guys,
Can someone give me the correct code to create an outlook task from excel? Thanks Albert |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Used these before, but can't test now because something in my Outlooks seems
to be corrupt. Try all three; I believe at least one will work for you: Sub CreateTask() Dim objApp As Outlook.Application Dim objTask As Outlook.TaskItem Set objApp = CreateObject("Outlook.Application") Set objTask = objApp.CreateItem(olTaskItem) With objTask .Subject = "Subject" .StartDate = CDate(ProximaFechaAcumulada) - CDate(15) .DueDate = CDate(ProximaFechaAcumulada) .Importance = olImportanceHigh .Body = "Body" 'Here I need Right to Left .Save .ReminderSet = True End With End Sub Sub AddTaskToOutlook() Dim objOutlook As Object Dim objTask As Object Dim NextStep As String Dim ProjName As String Dim cell As Range Const olTaskItem = 3 'Get the data NextStep = Range("C1") ProjName = Range("C2") ' Set objOLapp = CreateObject("Outlook.Application", "localhost") Set objOutlook = CreateObject("Outlook.Application") Set objTask = objOutlook.CreateItem(olTaskItem) objTask.Subject = NextStep objTask.Save Set objOutlook = Nothing Set objTask = Nothing End Sub Sub GeneratingTaskInOutlook() Dim objApp As Object Dim OutTask As Object Set objApp = CreateObject("Outlook.Application") Set OutTask = objApp.CreateItem(olTaskItem) With OutTask .StartDate = Date .DueDate = GetNextDay(Date, 1) .Importance = olImportanceHigh .Display .ReminderSet = True End With End Sub Regards, Ryan--- -- RyGuy "Albert" wrote: Hi Guys, Can someone give me the correct code to create an outlook task from excel? Thanks Albert |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
How do I create Microsoft Office Outlook Task in Excel 2007? | Excel Discussion (Misc queries) | |||
Create Outlook Task from Data in Excel Row | Excel Programming | |||
Can I create a button in Excel that generates a task in Outlook? | Excel Discussion (Misc queries) | |||
Create Outlook task from Excel Macro? | Excel Programming |