Differences Between VBScript Macros and Developer Studio Add-ins

Home Page (Macros)OverviewHow Do I TopicsFAQReference

VBScript macros differ from Developer Studio add-ins. The primary difference is that macros are procedures written in the Visual Basic Scripting Edition (VBScript) language, whereas add-ins are in-process COM components (DLLs) written in Visual C++ or Visual Basic.

You can create a VBScript macro more quickly and easily than you can an add-in. To create a macro, you simply record the macro, add extra code (if necessary), and then run the macro. To create an add-in, however, you must write it in a language such as Visual C++, compile it into a DLL, connect it to the Visual C++ Developer Studio environment, and then run its commands.

VBScript macros are not as versatile as add-ins. In macros, you can only use the VBScript language, and you can only access the Developer Studio object model. In add-ins, however, you can use a language of your choice, and you can access not only the object model but the resources of the entire computer system.

The following table summarizes the differences between macros and add-ins.

VBScript macros Developer Studio add-ins
Are interpreted Are compiled
Are easy to create Are more difficult to create
Can only be written in VBScript Can be written in different languages, such as Visual C++ and Visual Basic
Can only access the Developer Studio object model Can access local computer resources as well as the Developer Studio object model
Can only use dialog boxes created by the VBScript and commands Can use arbitrary modal dialog boxes
Cannot directly read from or write to files on disk Can directly read from or write to files on disk, using the Win32 API
Cannot access the Win32 API Can access the Win32 API
Cannot use early binding Can use early binding for better run-time performance
Cannot control another application (.EXE) Can control another application (.EXE)