Welcome to MSDN Blogs Sign in | Join | Help

News

  • <font color="WHITE">Le Café Central de DeVa</font> DeVa rocks

    Bookmark and Share Bookmark and Share

    I changed the way of blogging, re-designed along with Windows 7 launch!!
    Additionally added feature, so that you can try to view the page in your language (any one of them)


    Translate into your language

    My XBOX Live

    XBox Live

    Disclaimer:

    This weblog/blog is solely my opinion.The information in this weblog/blog is provided "AS IS" with no warranties, and confers no rights. This weblog/blog does not represent the thoughts, intentions, plans or strategies of my employer. Inappropriate comments will be deleted at the authors discretion.

    Use of included script samples are subject to the terms specified in theTerms of Use

    .

    Privacy Statement:
    I do not collect personal data associated with comments posted to this site.


    Comments:
    We would like to hear your comments, reviews & valuable constructive opinion....


    Site Statistics
    Locations of visitors to this page





    Make a difference


    Subscription offer


    Developer resources



    Students free software

    Try & Test Drive Online

    More about Windows 7



    Experiences

    Go Green!!




Outlook Object Model : Creating simple tasks programmatically using OOM & VBA?

In this post, we will create the simple Outlook tasks programmatically using Outlook Object Model API & VBA. We do this by using the code snippet:

'[Code Snippet for creating Simple Tasks using Outlook Object Model API & VBA]
 
Private Sub CreateTasks()
    
    'Declare the Task item
    Dim objTask As TaskItem
 
    ' Create Outlook Task item
    Set objTask = Application.CreateItem(olTaskItem)
    
    'Define its values
    objTask.Subject = "Test Item"
    objTask.Body = "Test task item"
    objTask.Importance = olImportanceNormal
    objTask.Status = olTaskNotStarted
    objTask.NoAging = True
    'Save the task
    objTask.Save
    MsgBox "Task Created"
      
    ' Clean up.
    Set objTask = Nothing
       
End Sub
Posted: Tuesday, June 23, 2009 6:57 PM by Deva Gnanam .J

Comments

yannick said:

That creates a task in outlook but how I create a task associate with the current contact...I mind that appears in the contact form.

Thanks in advance.

# July 10, 2009 10:55 AM
New Comments to this post are disabled
Page view tracker