Custom Task Form

S

SrYap

Created a new Task form. Published it in Task folder. How do I use this new
task form in MS-Access?
 
K

Ken Slovak - [MVP - Outlook]

You don't.

Custom Outlook forms are used in Outlook, not Access.
 
E

Eric Legault [MVP - Outlook]

You need to specify the class name of the custom form with the
MAPIFolder.Items.Add method for the folder where you want to create it:

Sub AddForm()
Dim myOlApp As New outlook.Application
Dim myNamespace As outlook.NameSpace
Dim myItems As outlook.Items
Dim myFolder As outlook.MAPIFolder
Dim myItem As outlook.TaskItem
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myFolder = _
myNamespace.GetDefaultFolder(olFolderTasks)
Set myItems = myFolder.Items
Set myItem = myItems.Add("IPM.Task.myTask")
End Sub


--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
-> Try Picture Attachments Wizard 2.0 For Microsoft Outlook <-
-> Take your SharePoint content offline <-
-> More info: http://www.collaborativeinnovations.ca <-
Blog: http://blogs.officezealot.com/legault
 
S

SrYap

Is this code to create a new form using MS-Access or to access the new form
created in Outlook? If it is to access the new form, do I use the same way to
assign the task, due date, .... as if it is the default Task form from
Outlook?

Thanks.

Eric Legault said:
You need to specify the class name of the custom form with the
MAPIFolder.Items.Add method for the folder where you want to create it:

Sub AddForm()
Dim myOlApp As New outlook.Application
Dim myNamespace As outlook.NameSpace
Dim myItems As outlook.Items
Dim myFolder As outlook.MAPIFolder
Dim myItem As outlook.TaskItem
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myFolder = _
myNamespace.GetDefaultFolder(olFolderTasks)
Set myItems = myFolder.Items
Set myItem = myItems.Add("IPM.Task.myTask")
End Sub


--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
-> Try Picture Attachments Wizard 2.0 For Microsoft Outlook <-
-> Take your SharePoint content offline <-
-> More info: http://www.collaborativeinnovations.ca <-
Blog: http://blogs.officezealot.com/legault


SrYap said:
Created a new Task form. Published it in Task folder. How do I use this
new
task form in MS-Access?
 
E

Eric Legault [MVP - Outlook]

This is Outlook code, so it's going to create an Outlook Task form, not an
Access form.

Even customized Task forms use the same properties and methods as the
TaskItem object. So yes - assign it and set dates as you normally would,
either in code or in the form.

--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS 2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
-> Try Picture Attachments Wizard 2.0 For Microsoft Outlook <-
-> Take your SharePoint content offline <-
-> More info: http://www.collaborativeinnovations.ca <-
Blog: http://blogs.officezealot.com/legault


SrYap said:
Is this code to create a new form using MS-Access or to access the new
form
created in Outlook? If it is to access the new form, do I use the same way
to
assign the task, due date, .... as if it is the default Task form from
Outlook?

Thanks.

Eric Legault said:
You need to specify the class name of the custom form with the
MAPIFolder.Items.Add method for the folder where you want to create it:

Sub AddForm()
Dim myOlApp As New outlook.Application
Dim myNamespace As outlook.NameSpace
Dim myItems As outlook.Items
Dim myFolder As outlook.MAPIFolder
Dim myItem As outlook.TaskItem
Set myNamespace = myOlApp.GetNamespace("MAPI")
Set myFolder = _
myNamespace.GetDefaultFolder(olFolderTasks)
Set myItems = myFolder.Items
Set myItem = myItems.Add("IPM.Task.myTask")
End Sub


--
Eric Legault [MVP - Outlook]
MCDBA, MCTS (Messaging & Collaboration, SharePoint Infrastructure, MOSS
2007
& WSS 3.0 Application Development)
President
Collaborative Innovations
-> Try Picture Attachments Wizard 2.0 For Microsoft Outlook <-
-> Take your SharePoint content offline <-
-> More info: http://www.collaborativeinnovations.ca <-
Blog: http://blogs.officezealot.com/legault


SrYap said:
Created a new Task form. Published it in Task folder. How do I use this
new
task form in MS-Access?
 

Ask a Question

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.

Ask a Question

Top