PRJ4: Error When You Use a Macro to Consolidate Files

Last reviewed: November 24, 1997
Article ID: Q130969
The information in this article applies to:
  • Microsoft Project for Windows, version 4.0
  • Microsoft Project for Macintosh, version 4.0

SYMPTOMS

Microsoft Project will generate an application error when you run a macro that is designed to merge a file into an active, combined project. This situation applies to combined windows and projects that have been consolidated and attached to source files.

RESOLUTION

When you use a macro to import a file, load the file without merging it. This will create a new "project" with the imported information. In Visual Basic for Applications, the command would be similar to the following example:

   Sub import()
       FileOpen Name:="Filename.txt", Merge:=pjDoNotMerge, _
       TaskInformation:=true
   End Sub

The constant pjDoNotMerge will force the imported information (either Text, .CSV, and so on) into a new project.

NOTE: When this procedure is done manually, Microsoft Project does not allow merging at all. When you do it via a macro, however, any file type other than MPX or MPP will cause this problem.

Microsoft provides examples of Visual Basic procedures for illustration only, without warranty either expressed or implied, including but not limited to the implied warranties of merchantability and/or fitness for a particular purpose. This Visual Basic procedure is provided 'as is' and Microsoft does not guarantee that it can be used in all situations. Microsoft does not support modifications of this procedure to suit customer requirements for a particular purpose.

STATUS

Microsoft has confirmed this to be a problem in the 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

A combined window of projects, in Microsoft Project is not a project in itself, but it is an image of selected projects combined in a separate window pane. Importing and merging a file requires the active window to be a true "project."

You cannot merge information into a consolidated project file (that is, a file that attaches itself to source project).


Additional query words: 4.00

Keywords : kbcode kbprg
Version : 4.0
Platform : MACINTOSH WINDOWS
Issue type : kberrmsg


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: November 24, 1997
© 1998 Microsoft Corporation. All rights reserved. Terms of Use.