INFO: Property Containing the Number Value of a Form

Last reviewed: January 22, 1998
Article ID: Q179640
The information in this article applies to:
  • Extended Messaging Application Programming Interface (MAPI), version 1.0
  • Microsoft Outlook 97

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;
   }

Keywords          : kbcode MAPIForm
Version           : WINDOWS:1.0,97
Platform          : WINDOWS
Issue type        : kbinfo


================================================================================


THE INFORMATION PROVIDED IN THE MICROSOFT KNOWLEDGE BASE IS PROVIDED "AS IS" WITHOUT WARRANTY OF ANY KIND. MICROSOFT DISCLAIMS ALL WARRANTIES, EITHER EXPRESS OR IMPLIED, INCLUDING THE WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE. IN NO EVENT SHALL MICROSOFT CORPORATION OR ITS SUPPLIERS BE LIABLE FOR ANY DAMAGES WHATSOEVER INCLUDING DIRECT, INDIRECT, INCIDENTAL, CONSEQUENTIAL, LOSS OF BUSINESS PROFITS OR SPECIAL DAMAGES, EVEN IF MICROSOFT CORPORATION OR ITS SUPPLIERS HAVE BEEN ADVISED OF THE POSSIBILITY OF SUCH DAMAGES. SOME STATES DO NOT ALLOW THE EXCLUSION OR LIMITATION OF LIABILITY FOR CONSEQUENTIAL OR INCIDENTAL DAMAGES SO THE FOREGOING LIMITATION MAY NOT APPLY.

Last reviewed: January 22, 1998
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.