Steve 5656565656

Hello,

I am having a problem running a VSTO application on anyother computer besides my development computer. The application was developed using VSTO 2005 SE. I am using MS Office SP2 with VSTO SE installed on the end user's computer, but I recive a runtime error when loading the document template:

Exception from HRESULT: 0x80040200


************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80040200): Exception from HRESULT: 0x80040200
at System.Runtime.InteropServices.UCOMIConnectionPoint.Advise(Object pUnkSink, Int32& pdwCookie)
at Microsoft.Office.Interop.Word.DocumentEvents2_EventProvider.add_XMLAfterInsert(DocumentEvents2_XMLAfterInsertEventHandler )
at Microsoft.Office.Interop.Word.DocumentEvents2_Event.add_XMLAfterInsert(DocumentEvents2_XMLAfterInsertEventHandler )
at Microsoft.Office.Tools.Word.XMLNodes.InitEvents(IHostItemProvider hostItemProvider, IRuntimeServiceProvider runtimeServiceProvider, String primaryCookie, Object container, String identifier)
at Microsoft.Office.Tools.Word.XMLNodes.Microsoft.VisualStudio.Tools.Applications.Runtime.ISupportInitializeControl.InitializeControl(IHostItemProvider hostItemProvider, IRuntimeServiceProvider runtimeServiceProvider, String primaryCookie, Object container, String identifier)
at Microsoft.Office.Tools.Word.XMLNodes..ctor(IHostItemProvider hostItemProvider, IRuntimeServiceProvider runtimeServiceProvider, String primaryCookie, Object container, String identifier)
at RunningReport.ThisDocument.InitializeControls()
at RunningReport.ThisDocument.Initialize()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.CreateStartupObject(EntryPoint entryPoint, Dependency dependency, Assembly objectAssembly)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.ConfigureAppDomain()
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadAssembliesAndConfigureAppDomain(IHostServiceProvider serviceProvider)
at Microsoft.VisualStudio.Tools.Applications.Runtime.AppDomainManagerInternal.LoadEntryPointsHelper(IHostServiceProvider serviceProvider)


************** Loaded Assemblies **************
mscorlib
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/Microsoft.NET/Framework/v2.0.50727/mscorlib.dll
----------------------------------------
Microsoft.VisualStudio.Tools.Applications.Runtime
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.VisualStudio.Tools.Applications.Runtime/8.0.0.0__b03f5f7f11d50a3a/Microsoft.VisualStudio.Tools.Applications.Runtime.dll
----------------------------------------
Microsoft.Office.Tools.Common
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Common/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Common.dll
----------------------------------------
System
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System/2.0.0.0__b77a5c561934e089/System.dll
----------------------------------------
System.Windows.Forms
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Windows.Forms/2.0.0.0__b77a5c561934e089/System.Windows.Forms.dll
----------------------------------------
System.Xml
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Xml/2.0.0.0__b77a5c561934e089/System.Xml.dll
----------------------------------------
RunningReport
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Program%20Files/chan/asi/RunningReport.DLL
----------------------------------------
Microsoft.Office.Tools.Word
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.816
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Word/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Word.dll
----------------------------------------
System.Data
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Data/2.0.0.0__b77a5c561934e089/System.Data.dll
----------------------------------------
BusinessObjects
Assembly Version: 1.0.2701.28111
Win32 Version: 1.0.2701.28111
CodeBase: file:///C:/Program%20Files/chan/asi/BusinessObjects.DLL
----------------------------------------
System.Configuration
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Configuration/2.0.0.0__b03f5f7f11d50a3a/System.Configuration.dll
----------------------------------------
DataConnection
Assembly Version: 1.0.2603.18238
Win32 Version: 1.0.2603.18238
CodeBase: file:///C:/Program%20Files/chan/asi/DataConnection.DLL
----------------------------------------
System.Transactions
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.Transactions/2.0.0.0__b77a5c561934e089/System.Transactions.dll
----------------------------------------
System.EnterpriseServices
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_32/System.EnterpriseServices/2.0.0.0__b03f5f7f11d50a3a/System.EnterpriseServices.dll
----------------------------------------
Microsoft.Office.Interop.Word
Assembly Version: 11.0.0.0
Win32 Version: 11.0.5530
CodeBase: file:///C:/Program%20Files/chan/asi/Microsoft.Office.Interop.Word.DLL
----------------------------------------


On my development computer everything works fine.

Does anyone know what I am missing



Re: Visual Studio Tools for Office COM Exception Error

Cindy Meister

Which version of Office is installed on the end-user's machine

At a guess, I'd say it's not Office 2003 PROFESSIONAL, which is the only one that provides the XML resources the error message is going on about at the top.

If that's not it, then you need to tell us what your VSTO 2005 SE Add-in is doing on startup. And what roll does a document template play






Re: Visual Studio Tools for Office COM Exception Error

Steve 5656565656

Hello Cindy, thank you for your reply,

The end user has Microsoft Office 2003 Professional edition.

At start up of the VSTO add-in, I am populating XML nodes that are part of a document template with data from a Sql Server 2005 database. The Word template file is a Word template that has an XML schema attached to it and uses my dll code behind file to populate the Word template.

I would also like to comment that on the end user's machine, the Microsoft.Office.Interop.Word.dll did not exist in the GAC so I had to add it to the root directory of the application. Would this have anything to do with it

Steve





Re: Visual Studio Tools for Office COM Exception Error

Steve 5656565656

Hello,

I solved it. I read the deployment article that was recently posted and I didn't have the Primary Interop assemblies loaded, so I went to

http://www.microsoft.com/downloads/details.aspx familyid=3c9a983a-ac14-4125-8ba0-d36d67e0f4ad&displaylang=en

and ran this.

Thanks,

Steve