FIX: No Update When Delete All MESSAGE_SHOWADBOOK Recipients

Last reviewed: October 30, 1997
Article ID: Q113896
3.00 WINDOWS kbprg kbbuglist

The information in this article applies to:

- Professional Edition of Microsoft Visual Basic for Windows, version 3.0

SYMPTOMS

When using the MAPI message action MESSAGE_SHOWADBOOK (11) while composing a message, you can select entries from the address book and those entries are reflected in the recipients list. But if you then go into the address book and delete all the entries, then when the dialog box terminates, it will not update the recipients list. It leaves all prior entries unmodified.

As a result, there's no way to detect if the user has used the dialog box to delete all the entries on the "To:" line.

WORKAROUND

If you use MESSAGE_SENDDLG to bring up the MAPI compose dialog box, you can click the address button to display the address book. If you delete all the entries from the dialog here, the changes are reflected in the Send dialog box. The problem only occurs when you bring up the Address book dialog box directly.

STATUS

Microsoft has confirmed this to be a bug in the Microsoft products listed at the beginning of this article. This problem has been corrected in Visual Basic version 4.0.

MORE INFORMATION

Steps to Reproduce Problem

  1. Start a new project in Visual Basic. Form1 is created by default.

  2. Add two text boxes (Text1, Text2), a command button (Command1), a MAPISession control (MAPISession1), and a MAPIMessages control (MAPIMessages1) to Form1.

  3. Add the following constants to the general declarations section:

    Const MESSAGE_SHOWADBOOK = 11 Const SESSION_SIGNON = 1

  4. Add the following code to your form in the appropriate event procedures:

       Sub Form_Load ()
          MAPISession1.Action = SESSION_SIGNON
          MAPIMessages1.SessionID = MAPISession1.SessionID
       End Sub
    
       Sub Command1_Click ()
          MAPIMessages1.MsgIndex = -1
          MAPIMessages1.AddressEditFieldCount = 1
          MAPIMessages1.Action = MESSAGE_SHOWADBOOK
          Text1.Text = Str(MAPIMessages1.RecipCount)
          Text2.Text = ""
          For i = 0 To MAPIMessages1.RecipCount - 1
             MAPIMessages1.RecipIndex = i
             Text2.Text = Text2.Text & MAPIMessages1.RecipDisplayName & ";"
          Next i
          MAPIMessages1.RecipIndex = 0
       End Sub
    
    

  5. Press the F5 key to run the program.

  6. Click the command button and select some entries in the address book. You will see them in the text box.

  7. Now click the button again. Delete all the entries in the dialog box. When you click OK and return, you'll see that it is as if nothing happened in the dialog box. This diminishes the usability of the Address dialog box.


Additional reference words: buglist3.00 3.00 fixlist4.00
KBCategory: kbprg kbbuglist
KBSubcategory: APrgOther
Keywords : APrgOther kbbuglist kbprg
Version : 3.00
Platform : WINDOWS
Solution Type : kbfix


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: October 30, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.