(Solved) VS2012: can't create a Word 2010 Macro-Enabled template due to error RRS feed

  • General discussion

  • Hi there,

    I'm evaluating VS 2012 and one of my goals is to develop Office 2010 extensions. For starters an extension for Word 2010.

    However, when I'm trying to start a new Visual C# project (Office Add-ins) I don't see any mentioning of Word 2010, only 2013. When I try to start a regular 'template project' everything seems to behave normally. But the moment when I try to create a macro-enabled template I'm greeted with the error pasted here:

    Although I think to understand the meaning of the error it doesn't make sense to me; Word 2010 is normally installed and is also the preferred application for a .dotm filetype.

    When checking some examples I already discovered the existence of the OpenXML SDK 2.0 for Microsoft Office, which I installed. Also the setting (in Word) to allow access to the object model has also been enabled.

    I'm using Windows 7 Professional Dutch (localized), Office 2010 (Dutch) and as said am evaluating Visual Studio 2012 (English), for which I have a (now) 88 day trial license.

    Any tips or help you can provide me would be highly appreciated!

    With kind regards, Peter

    • Edited by ShelLuser Tuesday, January 29, 2013 3:46 PM
    • Changed type ShelLuser Tuesday, January 29, 2013 3:46 PM I solved the problem
    Tuesday, January 29, 2013 2:13 PM

All replies

  • Solved, though I'm not 100% sure what exactly caused it so let me share my full (but not too verbose) story.

    I know the whole project depends on the Visual Studio Tools for Office (VSTO) and it didn't take me long to find a link to KB2525428 (VSTO runtime update). Unfortunately the link on that page no longer works (404).

    So, just to make sure my setup was right I asked the Office installer to perform a check / repair of the installation and then I found my way to the Office dev center. If you click on, say, 'Word Solutions' you'll eventually reach a getting started guide which tells you that you need 'VSTOR'. From there you can reach the installation scenarios and there (easily overlooked IMO) you can find the link to the real download page.

    From there you can download "vstor_redist.exe". I installed this one and rebooted (both just to be sure) and then it became all too obvious where I went wrong..

    In my above example (previous message) I used the "Office 2013" project option, which is wrong. If you're going to target Office 2010 then you'll need to use the options for Office 2010.

    So; after all this I could finally start a new project: "Word 2010 Template". From there I performed the same steps as mentioned above but this time the project gets created and an instance of Word 2010 is started.

    With kind regards, Peter

    Tuesday, January 29, 2013 3:45 PM