Hi there
I am in need of some help, baring in mind i have not much knowledge in macros. I need to set up a macro in excel 2007 that creates a task in outlook 2007 based on information in my worksheet.
Can anyone help please.
Regards
David
Hi,
You may use
Code:'activate Microsoft Outlook xx.x Object Library Dim myOlApp As Outlook.Application Dim myItem As Outlook.TaskItem Set myOlApp = New Outlook.Application Set myItem = myOlApp.CreateItem(olTaskItem) With myItem .Status = olTaskInProgress .Importance = olImportanceHigh .DueDate = DateValue("03/09/2009") .Body = "Rendez vous sur le forum" .TotalWork = 40 .ActualWork = 20 .Subject = "the task" .Assign 'recipients must exist in contacts list .Recipients.Add ("myname@provider.com") .Save .Send End With
Regards
michel
Hi there
Thanks very much for your reply but i get an error saying "compile error-user type not defined" this comes up on the first line "Dim myOlApp As Outlook.Application".
any clue whats going on?
Thank you in anticipation.
Regards
David
Hi,
You have to activate the Microsoft Outlook xx.x Object Library
In Visual Basic Editor :
Tools
References
Check 'Microsoft Outlook xx.x Object Library'
Click on OK button to validate.
Regards
michel
Thank you so much a life saver, really appreciate your help
regards
dave
michelxld
How would you get this code to select the dates from a column in excel. I would like to take the date from column Y then add one year to the date and create a task with the new date and use the information from column C & D as the subject. The column has about 100 dates.
Thanks
Vetequk
There are currently 1 users browsing this thread. (0 members and 1 guests)
Bookmarks