![]() |
If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Search this Thread | Display Modes |
#1
|
|||
|
|||
![]()
Hi,
I created a personalised Form in outlook 2003 for my contact, il added a button and I want by clicking on this button to create à task in the public folder I allready find the script to create this task in my box by using this Sctipt Sub CommandButton2_click() Set myItem = Application.CreateItem(2) myItem.Subject = "Rapport de traitement" myItem.Display end sub But I didn't found the way to create it in a public folder Ps: I now how to extract the name of th public folder Tk's a lot |
Ads |
#2
|
|||
|
|||
![]()
To create a new item in a non-default folder, use the Add method on the target folder's Items collection:
Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") The message class argument is optional. You can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "bbnimda" wrote in message ... Hi, I created a personalised Form in outlook 2003 for my contact, il added a button and I want by clicking on this button to create à task in the public folder I allready find the script to create this task in my box by using this Sctipt Sub CommandButton2_click() Set myItem = Application.CreateItem(2) myItem.Subject = "Rapport de traitement" myItem.Display end sub Ps: I now how to extract the name of th public folder |
#3
|
|||
|
|||
![]()
Hi again, Tks for your response but it doesn't work Err Message " Missing
object " Sub CommandButton3_click() Set Rep2Base = Application.GetNamespace("MAPI").Folders("dossiers publics").Folders("tous les dossiers publics").Folders("Comptes rendus") msgbox rep2base Set NewItem = rep2base.Items.Add("Ipm.Post.Cpt Rendu") newitem.display end Sub I think this script is missing a step for creating the task ? no ? tks "Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... To create a new item in a non-default folder, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") The message class argument is optional. You can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "bbnimda" wrote in message ... Hi, I created a personalised Form in outlook 2003 for my contact, il added a button and I want by clicking on this button to create à task in the public folder I allready find the script to create this task in my box by using this Sctipt Sub CommandButton2_click() Set myItem = Application.CreateItem(2) myItem.Subject = "Rapport de traitement" myItem.Display end sub Ps: I now how to extract the name of th public folder |
#4
|
|||
|
|||
![]()
Thks a lot i found my error U were right.
"Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... To create a new item in a non-default folder, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") The message class argument is optional. You can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "bbnimda" wrote in message ... Hi, I created a personalised Form in outlook 2003 for my contact, il added a button and I want by clicking on this button to create à task in the public folder I allready find the script to create this task in my box by using this Sctipt Sub CommandButton2_click() Set myItem = Application.CreateItem(2) myItem.Subject = "Rapport de traitement" myItem.Display end sub Ps: I now how to extract the name of th public folder |
#5
|
|||
|
|||
![]()
What statemtn raises that error?
-- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "bbnimda" wrote in message ... Hi again, Tks for your response but it doesn't work Err Message " Missing object " Sub CommandButton3_click() Set Rep2Base = Application.GetNamespace("MAPI").Folders("dossiers publics").Folders("tous les dossiers publics").Folders("Comptes rendus") msgbox rep2base Set NewItem = rep2base.Items.Add("Ipm.Post.Cpt Rendu") newitem.display end Sub I think this script is missing a step for creating the task ? no ? tks "Sue Mosher [MVP-Outlook]" a écrit dans le message de news: ... To create a new item in a non-default folder, use the Add method on the target folder's Items collection: Set newItem = targetFolder.Items.Add("IPM.Post.YourFormName") The message class argument is optional. You can use the code at http://www.outlookcode.com/d/code/getfolder.htm to walk the folder hierarchy and return the MAPIFolder corresponding to a given path string. -- Sue Mosher, Outlook MVP Author of Configuring Microsoft Outlook 2003 http://www.turtleflock.com/olconfig/index.htm and Microsoft Outlook Programming - Jumpstart for Administrators, Power Users, and Developers http://www.outlookcode.com/jumpstart.aspx "bbnimda" wrote in message ... Hi, I created a personalised Form in outlook 2003 for my contact, il added a button and I want by clicking on this button to create à task in the public folder I allready find the script to create this task in my box by using this Sctipt Sub CommandButton2_click() Set myItem = Application.CreateItem(2) myItem.Subject = "Rapport de traitement" myItem.Display end sub Ps: I now how to extract the name of th public folder |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
activate contact folder from public folder with "show this folder as email address book using a prf file | Frankie K. | Outlook - Using Contacts | 7 | July 25th 06 06:37 PM |
right click an appointment and choose create task in outlook | Rick Lewis | Outlook - Calandaring | 0 | May 14th 06 10:39 PM |
I create a new Task, but it won't let me set a reminder. | Tasker | Outlook - Calandaring | 1 | March 23rd 06 06:10 PM |
How do I create drop down boxes in Outlook Task Forms? | Cherry0429 | Outlook - Using Forms | 1 | February 13th 06 10:47 PM |
create a outlook task | Princess | Outlook - General Queries | 0 | January 25th 06 05:17 PM |