PC Forms: Err Msg: Bad Command Line (on Delivery)

Last reviewed: April 4, 1995
Article ID: Q128519
The information in this article applies to:
  • Microsoft Electronic Forms Designer, version 1.0

SYMPTOMS

When you receive a message containing an electronic form created with version 1.0 of Microsoft Electronic Forms Designer, you may receive the following error:

   Bad Command Line

This error will occur when the message is initially received, but it will not occur if the user attempts to open the same message after it has been delivered.

CAUSE

This will occur in the MEFPhone sample, MEFRoute sample, or any E-forms created using the Template project and the custom command declaration in either SHARED.INI or MSMAIL.INI that specifies the form should be activated on delivery. By default, there is no code in the Template project to support activation on delivery. To check to see if the form is installed to be activated on delivery or not, see if the array position 7 (position 0 to 15) is 1 or 0 on the form declaration entry in MSMAIL.INI or SHARED.INI.

Below is an example of a form declaration where the array position 7 (the 8th flag) of the operation map is set to 1 for activation upon delivery.

   [Custom Messages]
   ; all should be on the same line

   IPM.Microsoft.MEFPhone=3.0;;Telephone
    Note;;C:\WINDOWS\SYSTEM\MEFLIB.DLL;<MC:IPM.Microsoft.MEFPhone>
   C:\EFORMS\PROJECTS\PHONE\MEFPHONE.EXE -MSG <COMMAND>
   <MESSAGEID>;1111111100000000;Microsoft Sample Telephone Note;;;

RESOLUTION

To prevent this error, it is necessary to add support for activation on delivery. The following steps will modify the Template project so that any new forms created will support opening the form on delivery. Any existing projects, including the MEFPhone and MEFRoute samples would need to be modified in a similar manner to support this functionality.

  1. From Microsoft Visual Basic, open the Template project.

  2. Open the EFORM.BAS file included with the project.

  3. In the Proc: window, select ParseCommandLine.

  4. Locate following the program line:

          Select Case gCommand
    

  5. Three lines below that, you should find the following code fragment:

          ----------
          Case wcommandOpen
    
                      If gMessage.Flags And MAPI_SENT Then
                          frmRead.Show
                      Else
                          frmCompose.Show
                      End If
          ----------
    
       Change it to read:
    
          ----------
          Case wcommandOpen, wcommandDelivery
                      If gMessage.Flags And MAPI_SENT Then
                          frmRead.Show
                      Else
                          frmCompose.Show
                      End If
          ----------
    
    

  6. Save changes to the Template project.

MORE INFORMATION

For more information on the custom command declaration and the operation map, refer to the Microsoft Electronic Forms Designer version 1.0 "Developer's Guide," Chapter 12.


Additional reference words: 1.00
KBCategory: kbprg kberrmsg
KBSubcategory: MailPCForms


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: April 4, 1995
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.