Print Page | Close Window

how to set Outlook category

Printed From: Codejock Forums
Category: Codejock Products
Forum Name: Calendar
Forum Description: Topics Related to Codejock Calendar
URL: http://forum.codejock.com/forum_posts.asp?TID=21748
Printed Date: 04 December 2024 at 9:38pm
Software Version: Web Wiz Forums 12.04 - http://www.webwizforums.com


Topic: how to set Outlook category
Posted By: jixhut
Subject: how to set Outlook category
Date Posted: 26 June 2013 at 3:39pm
my dataprovider is Outlook 2010
by this code I read and add category from/to Outlook:
    ....
    Dim objCategory As Category
    Dim strOutput As String
    If myNamespace.Categories.count > 0 Then
        For Each objCategory In myNamespace.Categories
            strOutput = strOutput & objCategory.Name & _
                ": " & objCategory.CategoryID & vbCrLf
        Next
    End If
    Set objCategory = myNamespace.Categories("MyCategory")
    If Not objCategory Is Nothing Then
        ' check for the color and change if necessary
    Else
        ' add the category
        SetobjCategory = myNamespace.Categories.Add("MyCategory")
    End If
    MsgBox strOutput
 
by this code I wrote event, how I set "MyCategory" category? Label not coresponding with category.
 
    Me.m_pEditingEvent.Subject = txtSubject.Value
    Me.m_pEditingEvent.Location = txtLoc.Value
    Me.m_pEditingEvent.Body = txtBody.Value
    Me.m_pEditingEvent.BusyStatus = xtpCalendarBusyStatusBusy
    Me.m_pEditingEvent.ReminderMinutesBeforeStart = 30
    Me.m_pEditingEvent.Reminder = True
    Me.m_pEditingEvent.label = 5

? Me.m_pEditingEvent.Categories.count show 0 !!!!!
   
    Me.m_pCalendar.DataProvider.AddEvent Me.m_pEditingEvent




Print Page | Close Window

Forum Software by Web Wiz Forums® version 12.04 - http://www.webwizforums.com
Copyright ©2001-2021 Web Wiz Ltd. - https://www.webwiz.net