Three different development models for extending Office software features –office add-in model, VBA and VSTO

Source: Internet
Author: User

When Office users need to customize new features for a document, they can resort to VBA or two ways of VSTO. Office 2013 Rich Client, Microsoft provides a new model for developers on the Office platform---Office add-in model, which allows you to create an area in an Office application and show the Web pages interacting with the document in this area. Developers can integrate highly customized WEB apps or services into office, making them available on the entire office platform. The application is not actually installed on the computer running Office, but is hosted on the WEB server specified by the developer, so it can be easily maintained and updated from that server. Now there are social networks, mobile devices, a variety of cloud services, and real-time document collaboration, and the new model is working to connect Office with Web technologies and resources.

For developers, whether it's VBA, VSTO, or the new Office add-in Model, you can choose either way to solve real-world problems. If you are developing new extensions, you can prioritize the Office add-in Model implementation, because this approach has its unique advantages. Below, we introduce each of the three development models of the pros and cons, so that we know when appropriate choice of what kind of solution.

Office add-in Model

"Deployment Diversification" using the extended functionality developed in this way, called Office add-in, Microsoft provides a unified publishing store for such add-in---the Microsoft Office store. This maximizes the reduction of duplicate investments for similar businesses in different companies and departments, enabling all Office users to use high-quality office custom extensions on different office platforms, primarily rich clients, web Office, RT office, and more. In addition, the Office Store allows developers to charge for their own published Office add-in, which undoubtedly brings opportunities for high-quality add-in developers. In addition, Microsoft allows developers to deploy add-in in local shared folders or SharePoint App catalog so that only local area networks or the company's talent can use the add-in in Office software. In publishing and propagating, it is clear that the new add-in model is in the front of VBA and VSTO.

"Lower learning costs" develop office add-in, more so by leveraging today's popular web development technologies, and the cost of learning and developing office add-in is greatly reduced for developers, especially those who are already familiar with web technologies. Developers can even use existing Web services or websites to quickly build an office add-in.

"Maintenance and updates are easier" based on VBA and VSTO extensions, they run on-premises office software and rely on the appropriate platform support (such as VSTO relies on the primary interop assembly provided by Office software, such as MICROSOFT.OFFICE.INTEROP.E Xcel.dll). However, when Office software or some platform support inconsistencies, the same script or application may appear different on different machines, or even unsupported. The new add-in model developed under the add-in, because essentially run on the Office platform (including 2013 and later rich client, WEB version, RT version, even Mac version) embedded in the IFRAME, and Add-in itself is the developer host in the far Web server on the end. Add-in developers can quickly update the APP's functionality or fix bugs, depending on the situation.

Since this model is just beginning, there is a slight lack of customization of Office features, and more emphasis can be placed on web technologies in office.

Building office extension features with VSTO

VSTO (that is, Visual Studio Tools for Office) is a set of Visual Studio toolkits for creating custom Office applications. VSTO uses the. NET framework to customize and extend the functionality of Office. VSTO fully supports the C # and Visual Basic languages, so you can take advantage of common development models, tools, and methods in the. Net Framework. VSTO allows for the development of features that are tightly integrated with Office client programs, whether on APIs used or customized for user-operated interfaces. As shown in one of the VSTO solution in PowerPoint, it implements a custom Ribbon (top red box), a Windows Presentation Foundation-based task panel (the Right red box), and a floating windows Form window.

When developing with VSTO, developers use various templates in Visual Studio to create extension applications for Excel/outlook/infopath/project/powerpoint. When you create a new Office project with a template, Visual Studio adds a reference to the primary interop Assembly (PIA) that is required to build the project, such as Microsoft.Office.Interop.Excel.dll. In some cases, you may want to add a reference to another PIA (for example, if you want to use Microsoft Office Word features in Microsoft Office Excel projects). The primary interop assemblies available for Office 2013 and Office 2010 are listed in MSDN.

VSTO is the best choice when you need to highly customize Office features or develop extensions for rich clients in Office 2007, 2010, and the following editions.

VSTO-based solution, whose deployment and updates depend on the IT department of each enterprise. In addition, because VSTO allows for a high degree of customization, its operation requires the same permissions as other desktop programs, so it can access the file system or communicate with other software, so IT departments or users personally need to measure whether the VSTO solution to be installed is safe and reliable.

Vba

VBA is a tool for automating intra-Office client software operations. Because this technology is rooted in Visual Basic 6 and provides support for macro recorder in Word and Excel, VBA provides the possibility of automating tasks within Office documents. However, due to its long history, VBA is more of a customization and overall support for the tool framework on the UI.

VBA scripts can be stored in Office documents, which makes it easier to publish and propagate scripts initially, but when documents are widely propagated and replicated by mail or otherwise, it can become cumbersome to make changes to the scripts. In addition, a VBA script can be made at the application level and not associated with a particular document, which requires that each user who uses it is properly installed in a specific directory.

One of the important reasons for Office's great success is VBA, which can do a lot of things with VBA, with countless VBA widgets based on Excel and Word. VBA's language entry thresholds are low, and these users take advantage of VBA to address key issues in formal work. As a result, VBA programs are mostly used as a gadget within a department or for individuals.

Other than that

To prevent the use of VSTO developers from confusing the new add-in Model with the previous Office add-in concepts, the following table lists Microsoft's most recent naming of concepts related to Office platform development:

Formerly

New name

Suitable for

Apps for Office

Office Add-ins

Office 2013 and later (app model)

Mail app for Outlook

Outlook add-in

Office (VSTO)

App for Excel

Excel add-in

Office (VSTO)

App for PowerPoint

PowerPoint add-in

Office (VSTO)

App for Word

Word add-in

Office (VSTO)

Office App Model

Office add-in Model

Office (App model)

Apps for SharePoint

SharePoint Add-ins

SharePoint (SharePoint App model)

SharePoint App Model

SharePoint add-in Model

SharePoint (SharePoint App model)

App part

Add-in part

SharePoint (SharePoint App model)

App Web

Add-in Web

SharePoint (SharePoint App model)

Accordingly, in Office Developer Tools for Visual Studio, you will be divided into the following categories:

Type

Description

Example

Office Web Add-ins

Add-ins based on the Web technologies provided by the new Office add-in Model.

Web Technology-based app model

Excel Web add-in

Office VSTO Add-ins

Add-ins based on managed code technologies built with Visual Studio Tools for Office (VSTO).

(VSTO)

Excel VSTO add-in

Office COM Add-ins

Add-ins based on COM and VBA technology this extend applications by adding custom commands and specialized features.

Excel COM add-in

Resources

Roadmap for Apps for Office, VSTO, and VBA--http://blogs.msdn.com/b/officeapps/archive/2013/06/18/ Roadmap-for-apps-for-office-vsto-and-vba.aspx

Office Primary Interop Assemblies--https://msdn.microsoft.com/zh-cn/library/15s06t57.aspx

New names for apps for Office and SharePoint---https://msdn.microsoft.com/en-us/library/fp161507.aspx#bk_newname

If you want to reprint, please specify the source http://www.cnblogs.com/simpeng/p/4640850.html, thank you.

Three different development models for extending Office software features –office add-in model, VBA and VSTO

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.