The information in this article applies to:
SYMPTOMSWhen running a Microsoft Visual Basic application that uses the Microsoft MAPI Control, and that application relies upon the current working directory, the application might not work as expected. CAUSEThis is due to the fact that the working directory gets changed after calling the SignOn method of the MAPISession object. This was not the behavior prior to installing Internet Explorer 5.0. RESOLUTIONInstead of relying on the current working directory, which can be modified at run-time, use App.Path or specify the full path of the file. MORE INFORMATIONThere are some procedure or function calls that expect a string containing the path name to a file as one of their parameters. In some cases, you can give it just the filename instead of the whole path to the file. In this case the method or procedure looks for the file in the current working directory. The current working directory is initially set to the directory where the executable file resides. However, the current working directory gets changed by the SignOn method call of the MAPISession object. The current working directory can also be changed in code with the CurDir function. If the file resides in the application's directory, then you can concatenate App.Path to the name of the file. App.Path is read-only at run-time. You can also give the full path name of the file when passing it to the procedure or function. Note that although App.Path is read-only at run-time, this property can get changed by VB when running in the VB IDE. For more information on debug versus compiled mode, refer to the "eferences section below." Steps to Reproduce BehaviorThe following steps assume you already have an Outlook profile set up on your computer. If you do not, please see the "References" section below to link to an article that describes how to set up an Outlook profile.
REFERENCESFor additional information on behavior differences between running projects in the IDE and compiled EXEs, click the article number below to view the article in the Microsoft Knowledge Base: Q201741 INFO: Differences of Behavior in Debug Mode and Compile ModeFor additional information on creating Outlook user profiles, click the article number below to view the article in the Microsoft Knowledge Base: Q195718 OL2000: (CW) How to Create a New User Profile for Outlook Additional query words: Error 53 found Open Statement
Keywords : kbActiveX kbMAPI kbString kbVBp600 kbGrpVB kbIE500 kbDSupport |
Last Reviewed: December 8, 1999 © 2000 Microsoft Corporation. All rights reserved. Terms of Use. |