Tassk from access to Outlook

  • Thread starter Thread starter Chad
  • Start date Start date
C

Chad

Is there a way to push a task from access to Outlook and
set the time, frequency, subject, message, and to email
address?

Something like:

Dim objOutlook As Object
Dim objOutlookMsg As Object
Dim objOutlookRecip As Object
Dim objSentFolder As Object
Dim myNamespace As NameSpace
Dim myTaskItems As Object

Set objOutlook = CreateObject("Outlook.Application")
Set myNamespace = objOutlook.GetNamespace("MAPI")
Set mytask = myNamespace.GetDefaultFolder(olFolderTasks)
Set mytask = mytask.Parent.Folders.Add
("IPM.Task.myTask") 'This is not inserting a task - only
a folder named "IPM.Task.myTask"

Need the SendToAddress
Need to populate the Subject field
Need to populate the Message field
Need to set to email daily at a certain time

Thanks
Chad
 
Tasks don't get emailed unless you assign them to someone or you attach the
task or its text to an email. You have to code that separately.

Create a task by adding an item to a Tasks folder and then set the
MessageClass of the task item to what you want. Then set all your standard
and user-defined task fields.
Set mytaskfolder = myNamespace.GetDefaultFolder(olFolderTasks)
Set mytask = mytaskfolder.Items.Add
mytask.MessageClass = ("IPM.Task.myTask"

Use the Object Browser to see what properties are available for Task items
and how they are named and used.
 
Back
Top