BeckyB

Every time I add a numericupdn control (or any control for that matter) I get the following error. This is in VSTO for a word document. I'm adding the control into a table cell. If I let the designer drop the control where it wants to it is fine, but if I try to place it where I want I get the error.

I have Windows XP and am using Office 2003 SP2.

Designer failed to load correctly.

Then in the Error list I get...

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)

System.Runtime.InteropServices.COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION)) at Microsoft.VisualStudio.Tools.Applications.Runtime.IHostItemProvider.GetHostExtender(String extenderType, String extenderCookie, Object&extenderObject)

at.....

Here is the exception when I run the project...

Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))


************** Exception Text **************
System.Runtime.InteropServices.COMException (0x80020009): Exception occurred. (Exception from HRESULT: 0x80020009 (DISP_E_EXCEPTION))
at Microsoft.VisualStudio.Tools.Applications.Runtime.IHostItemProvider.GetHostExtender(String extenderType, String extenderCookie, Object& extenderObject)
at Microsoft.Office.Tools.Word.Controls.NumericUpDown.Microsoft.VisualStudio.Tools.Applications.Runtime.ISupportInitializeExtendedControl.InitializeControl(IHostItemProvider hostItemProvider, IRuntimeServiceProvider runtimeServiceProvider, String primaryCookie, String extenderCookie, Object container, String identifier)
at Microsoft.Office.Tools.Word.Controls.NumericUpDown..ctor(IHostItemProvider hostItemProvider, IRuntimeServiceProvider runtimeServiceProvider, String primaryCookie, String extenderCookie, Object container, String identifier)
at RBSCustSatSurvey.ThisDocument.InitializeControls() in C:\Projects\Snap Ins\RBSCustSatSurvey\RBSCustSatSurvey\ThisDocument.Designer.cs:line 174
at RBSCustSatSurvey.ThisDocument.Initialize() in C:\Projects\Snap Ins\RBSCustSatSurvey\RBSCustSatSurvey\ThisDocument.Designer.cs:line 65
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.ExecuteCustomization(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.42
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.42
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
----------------------------------------
RBSCustSatSurvey
Assembly Version: 1.0.0.0
Win32 Version: 1.0.0.0
CodeBase: file:///C:/Projects/Snap%20Ins/RBSCustSatSurvey/RBSCustSatSurvey/bin/Debug/RBSCustSatSurvey.DLL
----------------------------------------
Microsoft.Office.Tools.Word
Assembly Version: 8.0.0.0
Win32 Version: 8.0.50727.42
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Microsoft.Office.Tools.Word/8.0.0.0__b03f5f7f11d50a3a/Microsoft.Office.Tools.Word.dll
----------------------------------------
Microsoft.Office.Interop.Word
Assembly Version: 11.0.0.0
Win32 Version: 11.0.5530
CodeBase: file:///C:/WINDOWS/assembly/GAC/Microsoft.Office.Interop.Word/11.0.0.0__71e9bce111e9429c/Microsoft.Office.Interop.Word.dll
----------------------------------------
System.Drawing
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/System.Drawing/2.0.0.0__b03f5f7f11d50a3a/System.Drawing.dll
----------------------------------------
Accessibility
Assembly Version: 2.0.0.0
Win32 Version: 2.0.50727.42 (RTM.050727-4200)
CodeBase: file:///C:/WINDOWS/assembly/GAC_MSIL/Accessibility/2.0.0.0__b03f5f7f11d50a3a/Accessibility.dll
----------------------------------------




Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

dhtroy

BeckyB

I just tried this in a test Word Template VSTO project of mine, as you described: opened Word inside studio, created a table, added a NumericUpDown control into a cell. Tried dragging and dropping control in various cells ... this all works for me ...

Tried, for giggles, marking the DOT file read-only, but that didn't crash the system either ...

Have you tried starting a new VSTO Word project with nothing in it, and then attempted to recreate the issue again, just to verify this isn't a problem with your existing project/solution







Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

BeckyB

Thanks for the reply. Yes I have tried with a new solution a few times.

I've also made sure I only have .Net 2.0 Framework, resintalled VSTO, made sure I have SP2 for Office 2003.

I have just discovered that I can succesfully add controls to an existing document, but if I choose to do a new document is when I have the problem.





Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

dhtroy

Can you give me step-by-step instructions on how you're doing this Also please verify if you are doing this instead the development environment or by clicking (opening) the document outside studio ... I want to be certain I clearly understand what it is you're doing to make this happen.





Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

BeckyB

Create a new Word Doc project (C#) in VSTO.

When wizard pops up, select create a new document. Right click on ThisDocument.cs and View Designer.

Insert table. Drag and drop numericupdown control into a table cell. Usually I get the error here. But sometimes I dont get it until I run in debug mode. Then I get an 'Office document customization is not available' error. The same one as I posted before.

Also, to add to my previous thread, even using a previous document doesnt work now. After I run it in debug a couple of times the error is produced.

It as though it will work for a little while, then stop working and never work again for that project.





Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

Cindy Meister

Hi Becky

FWIW, I can't duplicate the problem, either.

Before we start taking apart VSTO, let's check a couple of things with your Word installation, just to make sure it's not a problem at that level :-)

1. Close VS; Close Word; Close Outlook.

2. Search your system for the Normal.dot template and rename it to NormalOLD.dot. All new documents are created from this, by default. Next time Word starts, it will generate a clean copy when it can't find an existing one.

3. In the Registry, under HKCU/Software/Microsoft/Office/11.0/Word look for the DATA key and rename it. Here, again, Word will create one with the installation defaults.

Now try creating a VSTO project with an embedded control again. If everything works correctly, you can try renaming the DATA key in the Registry again to get back some of your customizations (assuming you had any you're missing). I wouldn't try going back to your old Normal.dot, however, but if there's anything in it you want to keep, there are techniques for getting most of the customizations back - just describe what you need.






Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

Aaron Hare - MSFT

Hi Becky.

I haven't heard back for a while, and it seems that you have a work-around, so I'm going to flag your question as answered. If you're still having issues, feel free to reactivate the thread.

-Aaron






Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

BeckyB

Thanks Aaron. FYI... I never did get this to work. I installed VSTO on a different machine and was able to go ahead. The XP machine that I was getting the errors on still has the same issues.


Thanks.





Re: Visual Studio Tools for Office VSTO Word doc design error when adding an numericupdn

DKing513

I am having the same problem, but on a client machine, not on my development machine.

I have a VSTO form that works fine on my machine, but when I deploy it to another machine, I recieve the same error as Becky. I have installed the VSTO Runtime, the Office Primary Interops, the MSO Security dll to the GAC, and setup the permissions for trusted assemblies using CASPOL.

Any ideas what is going on here