Microsoft KB Archive/823991

= BUG: &quot;Error Creating New Microsoft Office Document&quot; Error Message When You Use Automation to Build a Visual Studio Tools for the Microsoft Office System Project =

Article ID: 823991

Article Last Modified on 2/3/2006

-

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.



Steps to Reproduce the Behavior
 Start Microsoft Visual Studio .NET. On the File menu, point to New, and then click Project. Under Project Types, click Visual Basic Projects, click Console Application under Templates, and then click OK.  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(&quot;VisualStudio.DTE.7.1&quot;))

'Create a new project, not add item or subproject params(0) = &quot;{0F90E1D0-4999-11D1-B6D1-00A0C90F2744}&quot; params(1) = &quot;ProjectName&quot;     ' project name params(2) = &quot;C:\ProjectName&quot;  ' Local directory params(3) = &quot;&quot; params(4) = False             ' Create a new solution params(5) = &quot;&quot;                ' Solution name params(6) = True              ' Silent

objDte.MainWindow.Visible = True objDte.LaunchWizard( _   &quot;C:\Program Files\Visual Studio Tools for Office\OfficeProject\OfficeProjects\VB\VBXls.vsz&quot;, _    params)  Press F5 to build and then run the console application.

Keywords: kberrmsg kbbug kbnofix kbinterop kbautomation kbofficedev KB823991

-

[mailto:TECHNET@MICROSOFT.COM Send feedback to Microsoft]

© Microsoft Corporation. All rights reserved.