Creating a Task in an Personal Outlook Folder

  • Thread starter Thread starter Mark
  • Start date Start date
M

Mark

I have personal outlook Mail folder called MyInfo, how can I create a mail
item and store it in the MyInfo Folder.
 
Is the title about creating a task relevant?

If you create a new mail item it will be created in Drafts. When you create
it then move it to where you want it to live.
 
Sorry Ken I have read back at my question and cant believe what I wrote.
Here is the problem I have
I want to create a task programatically from data coming from SQL Server, I
can connect and retrieve data from SQL however I would like to create the
tasks in a Tasks folder called MyInfo with 3 sub folders called
"Tasks"-"FYI"-"Onhold"
 
If you have a handle to the folder where you want the new task created, use
the folder.Items.Add() method. That will create a new blank task and you can
set its properties from your SQL data.

If you're asking how to get a handle to your folder that would depend on
where it's located. In general one uses
NameSpace.Folders("folderName").Folders("folder2Name").Folders("etc.") to
get to various folders. If the folder is a subfolder of Tasks then
NameSpace.GetDefaultFolder(olFolderTasks).Folders("MyInfo") will take you
there.
 
Thanks Ken your help is appreciated, I will give it a go
___________________________________________________
 
Back
Top