BUG: "Error Creating New Microsoft Office Document" Error Message When You Use Automation to Build a Visual Studio Tools for the Microsoft Office System Project (823991)



The information in this article applies to:

  • Microsoft Visual Studio Tools for the Microsoft Office System version 2003

SYMPTOMS

When you use Microsoft Office Automation to build a Visual Studio Tools for the Microsoft Office System project, you may receive the following error message:
Error creating new Microsoft Office Document
After you receive this error message, you may also receive the following error message:
Error setting document properties

STATUS

Microsoft has confirmed that this is a bug in the Microsoft products that are listed at the beginning of this article.

MORE INFORMATION

Steps to Reproduce the Behavior

  1. Start Microsoft Visual Studio .NET.
  2. On the File menu, point to New, and then click Project.
  3. Under Project Types, click Visual Basic Projects, click Console Application under Templates, and then click OK.
  4. Add the following code to Sub Main (change any of the paths as appropriate for your computer):
     Dim objDte As Object, params(6) As Object
    objDte = System.Activator.CreateInstance( _
        System.Type.GetTypeFromProgID("VisualStudio.DTE.7.1"))
    
    'Create a new project, not add item or subproject
    params(0) = "{0F90E1D0-4999-11D1-B6D1-00A0C90F2744}"
    params(1) = "ProjectName"      ' project name
    params(2) = "C:\ProjectName"   ' Local directory
    params(3) = ""
    params(4) = False              ' Create a new solution
    params(5) = ""                 ' Solution name
    params(6) = True               ' Silent
    
    objDte.MainWindow.Visible = True
    objDte.LaunchWizard( _
        "C:\Program Files\Visual Studio Tools for Office\OfficeProject\OfficeProjects\VB\VBXls.vsz", _
        params)
    
  5. Press F5 to build and then run the console application.

Modification Type:MinorLast Reviewed:2/3/2006
Keywords:kbOfficeDev kbinterop kberrmsg kbBug kbAutomation kbnofix KB823991 kbAudDeveloper