This documentation is archived and is not being maintained.

IUccPresenceNoteInstance Interface

This content is no longer actively maintained. It is provided as is, for anyone who may still be using these technologies, with no warranties or claims of accuracy with regard to the most recent product version or service release.

Encapsulates a note category instance providing descriptions of a user's presence.

Namespace: Microsoft.Office.Interop.UccApi
Assembly: Microsoft.Office.Interop.UccApi (in

public interface IUccPresenceNoteInstance : IUnknown
public interface IUccPresenceNoteInstance extends IUnknown
public interface IUccPresenceNoteInstance extends IUnknown

An IUccPresenceNoteInstance instance is created when an IUccCategoryInstance object of the "note" name is published. This interface is thus obtainable from a "note" IUccCategoryInstance object. A note is a textual description of a user's presence. A note can be an out-of-facility (OOF) notification a user entered into a calendar application such as Microsoft Outlook messaging and collaboration client (calendar client) and Microsoft Exchange Server (calendar server). This type of note is known as OOF notes. A note can be any other description a user entered using a UCC API application. This type of notes is referred to as personal notes. Individual notes are encapsulated by the IUccPresenceNoteData interface. An IUccPresenceNoteInstance object can hold a set of notes of different types.

Win32 COM/C++ Syntax

interface IUccPresenceNoteInstance : IUnknown

The following example is a public constructor for an application class that wraps an instance of IUccPresenceNoteInstance. This class can be instantated by passing a received category instance published by a remote user as well as a publishable category instance created by the application itself. this._Note is a private field of the application Note class.

/// <summary>
/// Note wrap class constructor.
/// </summary>
/// <param name="pNote">Presence note as category instance</param>
public Note(IUccCategoryInstance pNote)
    if (pNote == null)
         throw new ArgumentNullException("pNote", "Cannot be null");
    this._Note = pNote as IUccPresenceNoteInstance;

A note can be also created and published by a local user. The following example creates a publishable instance of a presence note to be published by a local user

/// <summary>
/// Creates a publishable note
/// </summary>
/// <param name="content">string note content</param>
/// <param name="plcid">int locale Id</param>
/// <returns>IUccCategoryInstance note to publish</returns>
public IUccCategoryInstance CreatePublishableNote(
    string content, 
    int plcid)
    IUccCategoryInstance publishableNote = null;
    string noteCategory = this._pubMgr.GetPresenceCategoryName(
    publishableNote = this._pubMgr.CreatePublishableCategoryInstance(
    IUccPresenceNoteInstance myNote = publishableNote as IUccPresenceNoteInstance;
    //create a new note
    UccPresenceNoteData newData = myNote.CreateNote(

    //use new note to create a UccLocaleSTring
    UccLocaleString localeString = newData.CreateContent();

    //assign note text to locale string
    localeString.String = content;

    //assign locale Id to locale string
    localeString.Lcid = plcid;

    //assign locale string to note
    newData.Content = localeString;
    System.DateTime endDate = new DateTime(2008, 05, 01);
    newData.StartTime = System.DateTime.Now;
    newData.EndTime = endDate;

    return publishableNote;

Development Platforms

Windows XP Professional with Service Pack 2 (SP2), Windows Server 2000 with Service Pack 4, Windows Server 2003, Windows Vista Ultimate Edition, Windows Vista Business Edition, Windows Vista Enterprise Edition

Target Platforms