index > Visual Studio Tools for Office > VSTO Word doc design error when adding an numericupdn

VSTO Word doc design error when adding an numericupdn

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
----------------------------------------


BeckyB
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?





-dhtroy
dhtroy

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.

BeckyB
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.



-dhtroy
dhtroy

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.

BeckyB

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.




-- Cindy Meister (Word MVP)
Cindy Meister

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




This posting is provided "AS IS" with no warranties, and confers no rights.
Aaron Hare - MSFT

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.

BeckyB
reply 8

You can use google to search for other answers

 

More Articles

• Issues with Outlook Add-in - recommendations please
• Removing and Adding controls in the same name
• Rpresenting ranges as nmbers
• win 2000 ,powerpoint 2000 and VS 2005 interoperability issues
• Opening multiple VSTO enabled WordML docs
• Custom content in AppManifest (...or elsewhere)
• How to develop a new Hyperlink-like object ?
• Using InsertXML method?
• Referencing a VSTO Office Project (Word Document)
• Running MySql from Form in Outlook 2003 VSTO Add-in
Bookmark and Share
Welcome to Bokebb   New Update  
 

New Articles

• TrackRevisions method not available error
• Changing the View in Word 2003
• Using VSTO Addin to manage bookmark events
• Print an excel file
• Change the colour that indicates section
• Unable to connect to the Remote oracle d
• Time Delay using C# and VSTO
• Finding the current Table
• Problem deleting excel sheets
• Highlighting code in an email
• VS 2005 Professional with Office Tools
• Packaging Wizard - Root Installation Fol
• Bug in VSTO HandsOnLab.Lab5
• Project server error
• No such interface supported with v3

Hot Articles

• Infopath 2003 Template on Visual Studio
• Is this possible with VSTO 2005?
• Caching with app add-ins
• Is Visual Studio Tools for the Microsoft
• Missing InfoPath Template Project within
• VSTO MSDN Library
• Cannot find wrapper assembly for type li
• Print information of control
• Microsoft Access Run-time
• Accessing data from excel
• We shipped!!!!!
• Making help files
• How to make certain menu invalid or disa
• Delete a range in VSO
• Excel SaveAs() method

Recommend Articles

• Outlook VSTO Addin not loaded at startup
• Using shared data in an Outlook 2003 add
• Microsoft Office Information Bridge Fram
• Creating word template with bookmarks. i
• Problem in Reading Word File Programmati
• How to use the Events of Outlook.Applica
• Moveable controls
• Disable save alert in Excel
• any way to print excel directly with one
• Microsoft outlook Plugin Compatibility
• VSTO seminars
• Deployment problems
• Bug fix request
• MODI Languages
• Office 2003 SP2 Patch fails against Acce