BUG: Invalid Code Generated Implementing Outlook.MailitemLast reviewed: September 9, 1997Article ID: Q173571 |
The information in this article applies to:
SYMPTOMSThe following code (created by Visual Basic using the OUTLOOK.MAILITEM object) is displayed in the color red by the Visual Basic IDE, indicating an error in the code:
Private Sub MailItem_SaveAs(ByVal Path As String,_ Optional ByVal Type As Variant) CAUSEThe code generated uses "Type" in the second argument. "Type" is a reserved word in Visual Basic.
RESOLUTIONRename the second argument from "Type" to something that is not a reserved word in this declaration:
Private Sub MailItem_SaveAs(ByVal Path As String,_ Optional ByVal Type As Variant)Replace "Type" with "Arg2" as follows:
Private Sub MailItem_SaveAs(ByVal Path As String,_ Optional ByVal Arg2 As Variant) STATUSMicrosoft has confirmed this to be a problem in the Microsoft products listed at the beginning of this article. We are researching this problem and will post new information here in the Microsoft Knowledge Base as it becomes available.
MORE INFORMATION
Steps to Reproduce Problem
Keywords : vb5all Version : WINDOWS:5.0 Platform : WINDOWS Hardware : x86 Issue type : kbbug |
================================================================================
© 1998 Microsoft Corporation. All rights reserved. Terms of Use. |