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

This article has been archived. It is offered "as is" and will no longer be updated.
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 ObjectobjDte = System.Activator.CreateInstance( _    System.Type.GetTypeFromProgID("VisualStudio.DTE.7.1"))'Create a new project, not add item or subprojectparams(0) = "{0F90E1D0-4999-11D1-B6D1-00A0C90F2744}"params(1) = "ProjectName"      ' project nameparams(2) = "C:\ProjectName"   ' Local directoryparams(3) = ""params(4) = False              ' Create a new solutionparams(5) = ""                 ' Solution nameparams(6) = True               ' SilentobjDte.MainWindow.Visible = TrueobjDte.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.
Properties

Article ID: 823991 - Last Review: 01/17/2015 17:08:49 - Revision: 4.0

  • Microsoft Visual Studio Tools for the Microsoft Office System version 2003
  • kbnosurvey kbarchive kbofficedev kbinterop kberrmsg kbbug kbautomation kbnofix KB823991
Feedback