A Microsoft Outlook email forum. Outlook Banter

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.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Scripting How to create a task in public folder



 
 
Thread Tools Search this Thread Display Modes
  #1  
Old September 9th 06, 01:09 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 29
Default Scripting How to create a task in public folder

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  
Old September 9th 06, 03:08 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Scripting How to create a task in public folder

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  
Old September 9th 06, 10:45 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 29
Default Scripting How to create a task in public folder

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  
Old September 9th 06, 11:03 PM posted to microsoft.public.outlook.program_vba
bbnimda
external usenet poster
 
Posts: 29
Default Scripting How to create a task in public folder == Solved ==

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  
Old September 10th 06, 02:15 AM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Scripting How to create a task in public folder

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
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 05:37 PM
right click an appointment and choose create task in outlook Rick Lewis Outlook - Calandaring 0 May 14th 06 09:39 PM
I create a new Task, but it won't let me set a reminder. Tasker Outlook - Calandaring 1 March 23rd 06 05:10 PM
How do I create drop down boxes in Outlook Task Forms? Cherry0429 Outlook - Using Forms 1 February 13th 06 09:47 PM
create a outlook task Princess Outlook - General Queries 0 January 25th 06 04:17 PM


All times are GMT +1. The time now is 01:21 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2024 Outlook Banter.
The comments are property of their posters.