+ Reply to Thread
Results 1 to 2 of 2

create new task folder in outlook

  1. #1
    Forum Contributor
    Join Date
    01-18-2005
    Posts
    238

    create new task folder in outlook

    Could someone please help me with the following


    I know how to create a task in outlook using vba

    dim olApp as outlook.application
    dim olTask as outlook.taskitem

    set olapp = new outlook.application
    set oltask = olapp.createobject(oltaskitem)

    with oltask
    .subject
    .startdate
    etc.
    .display or .save
    End with

    set olapp = nothing
    set oltask = nothing


    but how do you create the folder or choose the folder where the task needs to go?


    Thank you for any help


    Josh

  2. #2
    Registered User
    Join Date
    01-19-2007
    Location
    Bangalore, India
    Posts
    66
    Try this.

    Dim olApp As Outlook.Application
    Dim olTask As Outlook.TaskItem
    Dim fld As Outlook.Folders

    Set olApp = New Outlook.Application
    Set olTask = olApp.CreateObject(oltaskitem)
    Set fld = olApp.CreateObject(Folders)


    With olTask
    .Subject = "Task1"
    .StartDate = " "
    End With

    With fld
    .Add olTask
    End With

    Set olApp = Nothing
    Set olTask = Nothing
    Set fld = Nothing

    Regards,
    Gajendra

+ Reply to Thread

Thread Information

Users Browsing this Thread

There are currently 1 users browsing this thread. (0 members and 1 guests)

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts

Search Engine Friendly URLs by vBSEO 3.6.0 RC 1