Insert Link from File Changes Current Directory

ID: Q109553


The information in this article applies to:
  • Microsoft OLE Libraries for Windows and Win32s, version 2.01


SUMMARY

The Open common dialog box changes the current working directory unless OFN_NOCHANGEDIR is specified. The UI Change Source dialog box depends on the change directory functionality, therefore, the Insert Object dialog box cannot be modified to change this behavior.


MORE INFORMATION

The Insert Object dialog box allows a user to insert a linked object into the container document from a file residing on disk. This action changes the current working directory to the drive and directory in which the file resides. If this file is located on a network drive and the network drive becomes unavailable after the link is established, any subsequent attempt to insert an embedded object will fail until the working directory is changed to a drive and directory that is accessible.

The problem materializes when the OLE 2.0 libraries attempt to WinExec a server application for a subsequent embedded object. In this situation, the call to WinExec fails because the current working directory is invalid.

Additional query words: 2.01 OpenFile

Keywords : kbole kbprg kbOLE200 kbGrpCom kbDSupport
Version : WINDOWS:2.01
Platform : WINDOWS
Issue type :


Last Reviewed: October 26, 1999
© 2000 Microsoft Corporation. All rights reserved. Terms of Use.