First understand that although you're using Access to access Outlook, this is
a Outlook question. You are only using Access to manipulate Outlook.
The technical answer is that you need to .Add an item to the .Items
collection of your Inbox. The down-earth how to do it answer is this...
Dim objOutlook as Object
Dim nms as Object
Dim fldr as Object
Dim newMail
Const es_olFolderInbox = 6
Set objOutlook = CreateObject("Outlook.application")
Set nms = objOutlook.GetNameSpace("MAPI")
Set fldr = nms.GetDefaultFolder(es_olFolderInbox)
'Replace IPM.Note with the className of your custom Task form, and
'change the variable from newMail to newTask for style purposes
Set newMail = fldr.Items.Add("IPM.Note")
With newMail
'See the VBA Reference in Outlook VBA Help for a list of the
various
'TaskItem properties as well as how to set any user defined
properties
end with
From here, post any followup questions in the OUTLOOK discussion group
Want to reply to this thread or ask your own question?
You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.