none
VSTO vs. classic VBA, questions on development and other things RRS feed

  • Question

  • Hello!

    I try to compare the classic VBA programming for Office with VSTO and need some help. So here we go:

    1. With VSTO, you can create application/document-Level add-Ins. So "add-in" is the right term regarding VSTO. But what is the term for Office VBA solutions - it is also "add-in" or just "macro" ?
    2. When using VSTO, I can develop my Add-Ins with all the features and capabilities of the powerful Visual Studio IDE. Is there also a way to develop VBA add-ins/macros with the Visual Studio or do I always have to use the IDE integrated in Office?
    3. VSTO solutions are managed code and get compiled - what about vba? I assume it is not managed, but how is it executed?

    Thank you


    • Edited by Feliciano_ Wednesday, June 6, 2012 1:20 PM
    Wednesday, June 6, 2012 1:19 PM

Answers

  • Hi Feliciano_,

    Thanks for posting in the MSDN Forum.

    With VSTO, you can create application/document-Level add-Ins. So "add-in" is the right term regarding VSTO. But what is the term for Office VBA solutions - it is also "add-in" or just "macro" ?

    As you said that VSTO have application-level project(it will be an add-in in host Office suite) and document-level project(it will generate a document of Word/Excel which have extend functions). And VBA can generate VBA Form, VBA class and Module in Office suite's VBA IDE. VBA is not only related to macro but also related to VBA Form, Office suite's (such as Word, Excel, PowerPoint, Outlook etc.) event.

    When using VSTO, I can develop my Add-Ins with all the features and capabilities of the powerful Visual Studio IDE. Is there also a way to develop VBA add-ins/macros with the Visual Studio or do I always have to use the IDE integrated in Office?

    VSTO applicaton can be developed in anyway in theory, such as edit via Notebook.exe if you master .NET program firmly. However it will bring greate trouble to you, develop it in Visual Studio will make more sense. And VBA project can be only developed in VBA IDE which embedded in Office suite.

    VSTO solutions are managed code and get compiled - what about vba? I assume it is not managed, but how is it executed?

    Not only VSTO solutions but also VBA projects need compile. VSTO solution will generate add-in or customized document after compile and VBA project will generate binary stream which embedded in Office suite.

    Have a good day,

    Tom


    Tom Xu [MSFT]
    MSDN Community Support | Feedback to us

    Thursday, June 7, 2012 5:28 AM
    Moderator