Custom Task Form

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

SrYap

Created a new Task form. Published it in Task folder. How do I use this new
task form in MS-Access?
 
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
 
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?
 
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?
 
Back
Top