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

Article translations Article translations
Article ID: 823991 - View products that this article applies to.
This article has been archived. It is offered "as is" and will no longer be updated.
Expand all | Collapse all

On This Page


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


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( _
    '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", _
  5. Press F5 to build and then run the console application.


Article ID: 823991 - Last Review: December 26, 2014 - Revision: 4.0
Applies to
  • Microsoft Visual Studio Tools for the Microsoft Office System version 2003
kbnosurvey kbarchive kbofficedev kbinterop kberrmsg kbbug kbautomation kbnofix KB823991

Contact us for more help

Contact us for more help
Connect with Answer Desk for expert help.
Get more support from smallbusiness.support.microsoft.com