View Single Post
  #2  
Old August 9th 08, 12:26 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Email to Task, move task to 'Other Tasks' folder to sync w/Sharepo

To create a new item in a non-default folder programmatically, use the Add
method on the target folder's Items collection:

Set newItem = targetFolder.Items.Add("IPM.Task.YourFormName")

To get a non-default folder (the targetFolder object), you need to walk the
folder hierarchy using the Folders collections or use a function that does
that for you. For examples, see:

http://www.outlookcode.com/d/code/getfolder.htm - uses a folder path string
http://www.outlookcode.com/codedetail.aspx?id=492 - searches for a folder by
name

To see the path for any folder, use View | Toolbars to display the Web
toolbar. The folder's path (prefixed with outlook will be displayed in the
address control on that toolbar.
--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook Programming: Jumpstart
for Administrators, Power Users, and Developers
http://www.outlookcode.com/jumpstart.aspx

"mitcham" wrote:

I need a VBA script that is executed via an Outlook 2007 rule when a specific
type of email is received (from a specific account, containing specific text).
The script should create an Outlook task with elements from the original
email (plus include the original email as an attachment), then move the task
to an 'Other Tasks' folder.

I have seen code somewhere that will created a task item from an email item.
But I have not seen anything that moves the task to a separate task folder
which, in this case, will synchronize with a Sharepoint 2007 site's task list.
Caveat: I know very little about programing VBA.


Ads