Home |
Search |
Today's Posts |
#2
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Try something like this:
______________________________________ Sub TaskFromThisRow() Const olFolderTasks = 13 Dim r As Integer Dim P As Integer r = ActiveCell.Row Set ol = CreateObject("Outlook.Application") Set ns = ol.GetNamespace("MAPI") Set olFolder = ns.GetDefaultFolder(olFolderTasks) Set taskItem = olFolder.Items.Add With taskItem .Subject = ActiveCell.Worksheet.Cells(r, 1).Value .DueDate = ActiveCell.Worksheet.Cells(r, 2).Value .Categories = ActiveCell.Worksheet.Cells(r, 3).Value If UCase(ActiveCell.Worksheet.Cells(r, 4).Value) = "HIGH" Then P = 2 ElseIf UCase(ActiveCell.Worksheet.Cells(r, 4).Value) = "LOW" Then P = 0 Else P = 1 End If .Importance = P .Save End With Set taskItem = Nothing Set ns = Nothing Set ol = Nothing End Sub _______________________________________ Steve wrote in message ... Hello, I have a workbook with multiple worksheets, and I'd like to be able to create tasks in Outlook based upon a selected row I highlight. The worksheets have the same format, which is basically: Task Name | Due Date | Category | Priority | X | Y | Z __________________________________________________ _______________ feed dog | March 1, 08| Pets | High | a | b | c do budget | March 9, 08| Finance | low | a | b | c fix car | May 3, 08 | Car | Med | a | b | c Now, I havent coded in VB before or created script in Excel...So was curious if anyone has this already created and i can import easily. Ideally would be great if there was a way i could highlight a row above and then press a button at top which creates the outlook task. any guidance appreciated! thanks s |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Creating Outlook Task from Excel | Excel Programming | |||
Creating an Outlook Task Item | Excel Discussion (Misc queries) | |||
Searching for an Outlook Task from Excel | Excel Programming | |||
Creating a task in Outlook from a date in Excel | Excel Discussion (Misc queries) | |||
Creating a task in outlook | Excel Programming |