BUG: Invalid Code Generated Implementing Outlook.Mailitem (173571)
The information in this article applies to:
- Microsoft Visual Basic Control Creation Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 5.0
- Microsoft Visual Basic Learning Edition for Windows 6.0
- Microsoft Visual Basic Professional Edition for Windows 5.0
- Microsoft Visual Basic Professional Edition for Windows 6.0
- Microsoft Visual Basic Enterprise Edition for Windows 5.0
- Microsoft Visual Basic Enterprise Edition for Windows 6.0
This article was previously published under Q173571 SYMPTOMS
The 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)
CAUSE
The code generated uses "Type" in the second argument. "Type" is a reserved
word in Visual Basic.
RESOLUTION
Rename 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)
STATUS
Microsoft 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.
Modification Type: | Major | Last Reviewed: | 5/13/2003 |
---|
Keywords: | kbbug KB173571 |
---|
|