Microsoft Office development tool Visual Studio 2015

Source: Internet
Author: User
Tags visual studio 2010

Microsoft Office development tool Visual Studio 2015

Microsoft launched Visual Studio 2015 for Office development tools. It supports Clang compiler and LLVM framework, and can develop applications for Android and iOS. Visual Studio 2015 supports Java, ANT, SQL LITE, and WebSocket4web, and provides native Git support. You can try to create a new project type in the new version. The following describes the installation steps and new features.

The installation procedure is as follows:

  1. If Visual Studio 2015 is not installed, click get Visual Studio Community 2015 for free!
  2. Obtain the latest Office development kit from aka. ms/GetLatestOfficeDevTools.
  3. Make sure that you have installed Outlook 2016.

New features: Supporting external applications is the focus

Visual Studio 2015 has many new features. In addition to being able to implicitly support some of the new language structures defined in ECMAScript 2015, the JavaScript editing tool leverages the list of tasks inherent in Visual Studio, in addition to making JavaScript editing simpler, Visual Studio 2015 also supports directly generating Linux binary programs. However, this section focuses on the functions of the Office external applications.

In the new version of Visual Studio 2015, the development team has added a new project type in the Office external application, called Outlook Add-in with Commands. You can add a button to an external application in the Outlook functional area to start the display menu of an external program or execute a custom JavaScript function to provide a seamless office experience.

Use VersionOverrides to declare a command in the list to ignore the old version of Office, so as to ensure compatibility with users.

You can now create an external program that Inserts custom text when writing an email. When reporting related issues, the customer support staff usually need to ask for more details and provide instructions on how to find the version and serial number. It is very convenient-saves a lot of time-insert such common text buttons in Outlook. The development team will also gradually use an example to create an external program that inserts a custom document when writing an email.

In Visual Studio 2015, choose File> new project, select template> Office/SharePoint> Outlook Add-in with Commands to create a new Outlook external program command project:

To view these buttons, select the OutlookAddIn node in solution manager, change the start operation to the office desktop client in the Properties window, start Outlook 2016, and press F5:

As you can see, by selecting the show all Properties button to start the external program, when the user reads the information (define MessageRead in the list) appears in the functional area. Now, you can add a menu button on the functional area when writing an email (MessageCompose surface.

Stop debugging, click the OutlookAddInManifest node on Solution Explorer, and open the XML file list.

At the end of the </ExtensionPoint> label, add an ExtensionPoint label for the Add menu button to MessageCompose.
...
<ExtensionPointxsi: type = "MessageComposeCommandSurface">
<OfficeTabid = "TabDefault">
<Groupid = "msgComposeDemoGroup">
<Labelresid = "groupLabel"/>
<Controlxsi: type = "Menu" id = "msgComposeMenuButton">
<Labelresid = "menuComposeButtonLabel"/>
<Supertip>
<Titleresid = "menuComposeSuperTipTitle"/>
<Descriptionresid = "menuComposeSuperTipDescription"/>
</Supertip>
<Icon>
<Bt: Imagesize = "16" resid = "icon16"/>
<Bt: Imagesize = "32" resid = "icon32"/>
<Bt: Imagesize = "80" resid = "icon80"/>
</Icon>
<Items>
<Itemid = "msgComposeMenuItem1">
<Labelresid = "menuItem1ComposeLabel"/>
<Supertip>
<Titleresid = "menuItem1ComposeLabel"/>
<Descriptionresid = "menuItem1ComposeTip
"/>
</Supertip>
<Icon>
<Bt: Imagesize = "16" resid = "icon16"/>
<Bt: Imagesize = "32" resid = "icon32"/>
<Bt: Imagesize = "80" resid = "icon80"/>
</Icon>
<Actionxsi: type = "ExecuteFunction">
<FunctionName> addMsg1ToBody </FunctionName>
</Action>
</Item>
<Itemid = "msgComposeMenuItem2">
<Labelresid = "menuItem2ComposeLabel"/>
<Supertip>
<Titleresid = "menuItem2ComposeLabel"/>
<Descriptionresid = "menuItem2ComposeTip
"/>
</Supertip>
<Icon>
<Bt: Imagesize = "16" resid = "icon16"/>
<Bt: Imagesize = "32" resid = "icon32"/>
<Bt: Imagesize = "80" resid = "icon80"/>
</Icon>
<Actionxsi: type = "ExecuteFunction">
<FunctionName> addMsg2ToBody </FunctionName>
</Action>
</Item>
</Items>
</Control>
</Group>
</OfficeTab>
</ExtensionPoint>
...
At the Resources node at the end of the list, replace the nodes of stringstrings and LongStrings with the following code.
...
<Bt: Rule strings>
<Bt: Stringid = "groupLabel" DefaultValue = "My Add-in Group"/>
<Bt: Stringid = "paneReadButtonLabel" DefaultValue = "Display all properties"/>
<Bt: Stringid = "paneReadSuperTipTitle" DefaultValue = "Get all properties"/>
<Bt: Stringid = "menuComposeButtonLabel" DefaultValue = "Insert message"/>
<Bt: Stringid = "menuComposeSuperTipTitle" DefaultValue = "Choose a message to insert"/>
<Bt: Stringid = "menuItem1ComposeLabel" DefaultValue = "Insert custom message #1"/>
<Bt: Stringid = "menuItem2ComposeLabel" DefaultValue = "Insert custom message #2"/>
</Bt: Rule strings>
<Bt: LongStrings>
<Bt: Stringid = "paneReadSuperTipDescription" DefaultValue = "Opens a pane displaying all available properties. This is an example of a button that opens a task pane."/>
<Bt: Stringid = "menuComposeButtonTooltip" DefaultValue = "Inserts your choice of text into body of the message."/>
<Bt: Stringid = "menuComposeSuperTipDescription" DefaultValue = "Inserts your choice of text into body of the message. This is an example of a drop-down menu button."/>
<Bt: Stringid = "menuItem1ComposeTip" DefaultValue = "Inserts custom message #1 into the body of the email."/>
<Bt: Stringid = "menuItem2ComposeTip" DefaultValue = "Inserts custom message #2 into the body of the email."/>
</Bt: LongStrings>
...
Finally, add some custom JavaScript functions at the end of functions/functions. js:
...
// Adds text into the body of the item, then reports the results to the info bar.
Function addTextToBody (text, icon, event ){
Office. context. mailbox. item. body. setSelectedDataAsync (text,
{CoercionType: Office. CoercionType. Text },
Function (asyncResult ){
If (asyncResult. status = Office. AsyncResultStatus. Succeeded ){
StatusUpdate (icon, "\" "+ text +" \ "inserted successfully .");
} Else {
Office. context. mailbox. item. icationicationmessages. addAsync ("addTextError ",{
Type: "errorMessage ",
Message: "Failed to insert \" "+ text + "\":"
+ AsyncResult. error. message
});
}
Event. completed ();
});
}
Function addMsg1ToBody (event ){
AddTextToBody ("Custom message #1", "icon16", event );
}
Function addMsg2ToBody (event ){
AddTextToBody ("Custom message #2", "icon16", event );
}

Run the external program to view the new menu. Because we add the menu to MessageCompose, You need to click Create mail icon in the upper left corner of Outlook 2016 to create a new mail.

That's it! You have successfully added an external command program. For more information about how to Add commands to Office add-in, see Overview of add-in commands for mail and Create a manifest for Add-in commands.

Visual Studio 2015 Update 2 RC released, Microsoft integrated development environment

Visual Studio Code simple trial

Visual Studio Code trial

Visual Studio 2010 & Help Library Manager installation instructions

How to configure OpenCV 2.3.x/2.4.x in Visual Studio 2005/2008 and Visual Studio 2010

Use the opencv-2.4.0.exe file to compile the x86 or x64 platform Visual Studio 2005/2008/2010 target file

Visual Studio LightSwitch supports HTML5 and JavaScript

Visual Studio 11: use C ++ to develop a simplest Metro application

Visual Studio details: click here
Visual Studio: click here

This article permanently updates the link address:

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.