Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 203
Default create outlook task from excel

Hi Guys,

Can someone give me the correct code to create an outlook task from excel?

Thanks
Albert
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 2,836
Default create outlook task from excel

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
How do I create Microsoft Office Outlook Task in Excel 2007? PamSue Excel Discussion (Misc queries) 0 March 18th 10 10:32 PM
Create Outlook Task from Data in Excel Row Theresa Excel Programming 0 October 20th 05 01:57 AM
Can I create a button in Excel that generates a task in Outlook? Tio777 Excel Discussion (Misc queries) 1 June 15th 05 03:41 PM
Create Outlook task from Excel Macro? Jay Harris Excel Programming 4 February 25th 05 08:33 PM


All times are GMT +1. The time now is 10:08 PM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"