Visual Studio Developer Center > Visual Studio Forums > Visual Studio Tools for Office > How to create menu in MS Word from a xml file?
Ask a questionAsk a question
 

AnswerHow to create menu in MS Word from a xml file?

  • Thursday, November 05, 2009 5:48 PManadiks Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    I want to generate my Word menu from the XML file. Can any one please give me any solution or any idea how to go about it.
    Thanks alot.

Answers

  • Friday, November 06, 2009 10:43 AMCindy MeisterMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    VSTO 2005 does not create a "shared add-in", it creates a VSTO add-in. A "shared add-in" is something else and is not supported in the VSTO forum.

    There's no way for you to directly "convert" an XML file to a command bar; not in Office and not in VSTO. Basically, all you can do is work through the XML file logically, and create the toolbar/menu based on the information it contains. But you have to work out the logic and code yourself.

    Since we have no idea how the logic of your XML file is built or how your menu should look, there's simply no way we can offer anything more concrete. If you don't know how to read an XML file using VS 2005's XML tools, then please ask in a forum that supports the .NET Framework XML namespaces.


    Cindy Meister, VSTO/Word MVP

All Replies

  • Friday, November 06, 2009 8:17 AMCindy MeisterMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    What version of Word are we talking about?

    And are you using VSTO? (The forum's Please Read First message describes what VSTO is.)
    Cindy Meister, VSTO/Word MVP
  • Friday, November 06, 2009 10:10 AManadiks_2 Users MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     
    i am making shared add in ... and i am using word 2003 & vsto 2005
  • Friday, November 06, 2009 10:43 AMCindy MeisterMVP, ModeratorUsers MedalsUsers MedalsUsers MedalsUsers MedalsUsers Medals
     Answer

    VSTO 2005 does not create a "shared add-in", it creates a VSTO add-in. A "shared add-in" is something else and is not supported in the VSTO forum.

    There's no way for you to directly "convert" an XML file to a command bar; not in Office and not in VSTO. Basically, all you can do is work through the XML file logically, and create the toolbar/menu based on the information it contains. But you have to work out the logic and code yourself.

    Since we have no idea how the logic of your XML file is built or how your menu should look, there's simply no way we can offer anything more concrete. If you don't know how to read an XML file using VS 2005's XML tools, then please ask in a forum that supports the .NET Framework XML namespaces.


    Cindy Meister, VSTO/Word MVP