none
office aplication in a vb.net form RRS feed

  • Question

  • Dear

    how can i run word, excell and outlook in a vb.net (2012) form?

    I would like to get a word doc from ms SQL SERVER, manipulate it with all word possibilities , save it back to the ms sqlerver

    same with outlook an excell.

    already tried with webbrowser but has problems with synchronastion

    thanks and regards

    Wim

    Thursday, January 10, 2013 6:35 PM

Answers

  • Hi wim

    Supplementing Damian's answer, with which I concur...

    The Office applications are not designed to be embedded in other applications. As a matter of fact, Microsoft has put some effort into making this more difficult, rather than less, over the last few years.

    If you need to interact with the user during the manipulation of the files, then you probably need to work inside the application interface by means of an Add-in that's running locally on the user's machine. That would be a topic for this, the VSTO forum.

    If you should work with the files independently of the user, or the user supplies input without working inside the Office document (through your VS interface) then the Office Open SDK is certainly the way to go for Word and Excel. You'll find more information about that at OpenXMLDeveloper.org. There's also an Open XML SDK forum on MSDN.


    Cindy Meister, VSTO/Word MVP, my blog

    Saturday, January 12, 2013 4:15 PM
    Moderator

All replies

  • one option is to use office automation which requires aforementioned apps to be installed along with your software (word, excel, etc.)  Then you use office API to create processes and load files into them and manipulate them invoking office functions. Second option is to use open xml sdk which does not require office apps to be installed but it can only handle 'new' file types (ending in 'x', i.e. docx, xlsx)
    Thursday, January 10, 2013 6:40 PM
  • Hi wim

    Supplementing Damian's answer, with which I concur...

    The Office applications are not designed to be embedded in other applications. As a matter of fact, Microsoft has put some effort into making this more difficult, rather than less, over the last few years.

    If you need to interact with the user during the manipulation of the files, then you probably need to work inside the application interface by means of an Add-in that's running locally on the user's machine. That would be a topic for this, the VSTO forum.

    If you should work with the files independently of the user, or the user supplies input without working inside the Office document (through your VS interface) then the Office Open SDK is certainly the way to go for Word and Excel. You'll find more information about that at OpenXMLDeveloper.org. There's also an Open XML SDK forum on MSDN.


    Cindy Meister, VSTO/Word MVP, my blog

    Saturday, January 12, 2013 4:15 PM
    Moderator