Results 1 to 2 of 2

Thread: [RESOLVED] Accessing Outlook custom task form data

  1. #1

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    Resolved [RESOLVED] Accessing Outlook custom task form data

    Hello all,
    I'm using Outlook 2000 and I'm trying to access data held on a customised Outlook task form held in a public folder.
    I'm using the following code to get at what I need, and can see certain values via objTask, but I can't see where I get at other 'fields' used on the form. One of the fields, for example, is called "CC Ref", but I can't find where I can get at it.

    Code:
            Dim objOutlook As Outlook._Application
            objOutlook = New Outlook.Application()
            Dim objNS As Outlook._NameSpace = objOutlook.Session
            Dim oAllPublicFolders As Outlook.MAPIFolder
            Dim oPublicFolders As Outlook.MAPIFolder
            Dim objCodeChangeRequests As Outlook.MAPIFolder
    
            oPublicFolders = objNS.Folders.Item("Public Folders")
            oAllPublicFolders = oPublicFolders.Folders.Item("All Public Folders")
            objCodeChangeRequests = oAllPublicFolders.Folders.Item("Code Change Requests")
            Dim objItems As Outlook.Items = objCodeChangeRequests.Items
            Dim objTask As Outlook._TaskItem
            objTask = objItems.GetFirst
    Thanks in advance!
    At home - VB.NET 2005/2008 Express, Visual Web Developer 2005 Express
    At work - VS 2008 Standard (VB)
    .NET 2.0/3.5


    Visual Studio Express Learning Centre | How do I videos | MSDN VB Express Forum | MSDN VB Developer Centre

  2. #2

    Thread Starter
    Addicted Member
    Join Date
    May 2006
    Location
    Manchester, England
    Posts
    255

    Re: Accessing Outlook custom task form data

    Found it .....

    Code:
    Dim objUP As Outlook.UserProperty
    objUP = objTask.UserProperties.Item("CC Ref")
    At home - VB.NET 2005/2008 Express, Visual Web Developer 2005 Express
    At work - VS 2008 Standard (VB)
    .NET 2.0/3.5


    Visual Studio Express Learning Centre | How do I videos | MSDN VB Express Forum | MSDN VB Developer Centre

Posting Permissions

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



Click Here to Expand Forum to Full Width