Home |
Search |
Today's Posts |
#1
Posted to microsoft.public.excel.programming
|
|||
|
|||
Sending information from a cell in excel to a task in outlook
Hi there I have code (at bottom of message) which allows me to create a task
in my outlook account and it is all working perfectly. How do I tweak it so a) it puts the body as the action outstanding (situated in column u) b) it sends the task if there is a month until the action needs to be completed as a reminder (due dates for actions are in column v) c) it goes down the list and checks each ones action due date (if they have one) to see if it a task is required d) it assigns them to other peoples e-mail accounts (all the relevant names are situated in column C which tie up with their e-mail names) Sub Create_Task_and_email_it_to_recipient() Dim olApp As Outlook.Application Dim olTask As Outlook.TaskItem Dim Subject As String Dim Body As String Dim wbBook As Workbook Dim wsMain As Worksheet Set wbBook = ThisWorkbook Set wsMain = wbBook.Worksheets("Risk By Function") With wsMain Subject = "Non-Financial Risk Actions due" Body = .Cells(4, 3).Value End With On Error GoTo Error_Handling Set olApp = GetObject(, "Outlook.Application") Set olTask = olApp.CreateItem(3) Application.ScreenUpdating = False With olTask ..Subject = Subject ..Body = Body ..Save End With Application.ScreenUpdating = True MsgBox "The task added into Outlook Tasklist and addressed by email to Recipient successfully.", vbInformation Exit_He Set olTask = Nothing Set olApp = Nothing Exit Sub Error_Handling: If Err.Number = 429 And olApp Is Nothing Then Set olApp = CreateObject("Outlook.Application") Resume Next Else MsgBox "Error No: " & Err.Number & "; Description: " Resume Exit_Here End If End Sub |
Reply |
Thread Tools | Search this Thread |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Forum | |||
Is there a way to link a cell (only) to an Outlook task? | Excel Worksheet Functions | |||
Import Task information from Excel to Outlook | Excel Discussion (Misc queries) | |||
Sending a task from Excel to Outlook | Excel Programming | |||
disregard the Outlook dialog box sending task/eMail from Excel 2003 | Excel Programming | |||
Sending an Outlook e-mail due to a condition in a cell | Excel Programming |