Share via


Differences Between Macros and Add-ins

VBScript macros differ from Platform Builder add-ins. The primary difference is that macros are procedures written in the VBScript language, whereas add-ins are in-process COM components (DLLs) written in Visual C++.

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 IDE, 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 Visual 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 also the resources of the entire computer system.

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

VBScript macros 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 Visual Studio object model Can access local computer resources as well as the Platform Builder object model
Can only use dialog boxes created by the VBScript InputBox and MsgBox 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 Microsoft 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)

See Also

Macros and Add-ins

 Last updated on Friday, October 08, 2004

© 1992-2003 Microsoft Corporation. All rights reserved.