Using custom Task form

  • Thread starter Thread starter SrYap
  • Start date Start date
S

SrYap

I created a new Task form in Outlook. How do I use the new task form in
MS-Access without making it as the default task form.
 
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
 
Back
Top