INFO: Property Containing the Number Value of a Form (179640)



The information in this article applies to:

  • Microsoft Extended Messaging Application Programming Interface (MAPI)
  • Microsoft Outlook 97

This article was previously published under Q179640

SUMMARY

When you create and install a form, you generally create a .cfg file. In a .cfg file you have the option to use the Number property. The Number property value appears in the client in the form manager.

Unfortunately, the FormInfo object does not return the Number property value in GetProps. You must obtain the value from the associated message on the folder that contains the form.

If the form is not installed in a particular folder, you should get the value from the associated message of the common views folder of the default message store.

The Number property value is stored under the property id 0x682B and is type PT_STRING8. You can use the following to create a property tag:

PROP_TAG(PT_STRING8,0x682B)

MORE INFORMATION

The following code illustrates retrieving the number value of a form, given the appropriate associated message:
   #include "mapix.h"
   #include "mapidefs.h"
   #include "mapiutil.h"
   #include "mapiform.h"

   BOOL DisplayNumberOfForm(LPMESSAGE lpMsg)
   {
      HRESULT      hr;
      LPMAPITABLE  lpTable        = NULL;
      LPSRowSet    lpRows         = NULL;
      LPSPropValue lpProp         = NULL;
      ULONG        cValues        = 0;
      ULONG        ulObjType      = 0;
      SizedSPropTagArray(1,rgPropTags) =
            { 1, {PROP_TAG(PT_STRING8,0x682b)} };

      hr = lpMsg->GetProps(
                (SPropTagArray*)&rgPropTags,0L,&cValues,&lpProp);

      if(hr == SUCCESS_SUCCESS)
      {
         if(lpProp[0].ulPropTag == PROP_TAG(PT_STRING8,0x682b))
            MessageBox(0L,lpProp[0].Value.lpszA,"Number",MB_OK);
      }
      return TRUE;
   }
				

Modification Type:MinorLast Reviewed:8/18/2005
Keywords:kbcode kbinfo KB179640