This tutorial teaches you how to build an Outlook add-in that can be used in message compose mode to insert content into the body of a message.
Sep 20, 2015 Some fonts not installed for office 2016 for Mac I installed the student version of Office 2016 for Mac and there are missing fonts. I looked in all the font folders inside of all the applications packages/bundles. Help and support for the Microsoft Outlook app on PC, Mac, and mobile. Find how-to articles, watch video tutorials, and get the most out of your Office 365 subscription.
In this tutorial, you will:
Prerequisites
Setup
The add-in that you'll create in this tutorial will read gists from the user's GitHub account and add the selected gist to the body of a message. Complete the following steps to create two new gists that you can use to test the add-in you're going to build.
Create an Outlook add-in project
Update the manifest
The manifest for an add-in controls how it appears in Outlook. It defines the way the add-in appears in the add-in list and the buttons that appear on the ribbon, and it sets the URLs for the HTML and JavaScript files used by the add-in.
Specify basic information
Make the following updates in the manifest.xml file to specify some basic information about the add-in:
Test the generated add-in
Before going any further, let's test the basic add-in that the generator created to confirm that the project is set up correctly.
Note
Office Add-ins should use HTTPS, not HTTP, even when you are developing. If you are prompted to install a certificate after you run the following command, accept the prompt to install the certificate that the Yeoman generator provides.
Define buttons
Now that you've verified the base add-in works, you can customize it to add more functionality. By default, the manifest only defines buttons for the read message window. Let's update the manifest to remove the buttons from the read message window and define two new buttons for the compose message window:
Remove the MessageReadCommandSurface extension point
Open the manifest.xml file and locate the
ExtensionPoint element with type MessageReadCommandSurface . Delete this ExtensionPoint element (including its closing tag) to remove the buttons from the read message window.
Add the MessageComposeCommandSurface extension point
Locate the line in the manifest that reads
</DesktopFormFactor> . Immediately before this line, insert the following XML markup. Note the following about this markup:
Update resources in the manifest
The previous code references labels, tooltips, and URLs that you need to define before the manifest will be valid. You'll specify this information in the
Resources Microsoft office mac update download. section of the manifest.
Reinstall the add-in![]()
Since you previously installed the add-in from a file, you must reinstall it in order for the manifest changes to take effect.
What microsoft should i get for college mac. After you've reinstalled the add-in, you can verify that it installed successfully by checking for the commands Insert gist and Insert default gist in a compose message window. Note that nothing will happen if you select either of these items, because you haven't yet finished building this add-in.
Implement a first-run experience
This add-in needs to be able to read gists from the user's GitHub account and identify which one the user has chosen as the default gist. In order to achieve these goals, the add-in must prompt the user to provide their GitHub username and choose a default gist from their collection of existing gists. Complete the steps in this section to implement a first-run experience that will display a dialog to collect this information from the user.
Collect data from the user
Let's start by creating the UI for the dialog itself. Within the ./src folder, create a new subfolder named settings. In the ./src/settings folder, create a file named dialog.html, and add the following markup to define a very basic form with a text input for a GitHub username and an empty list for gists that'll be populated via JavaScript.
Next, create a file in the ./src/settings folder named dialog.css, and add the following code to specify the styles that are used by dialog.html.
Now that you've defined the dialog UI, you can write the code that makes it actually do something. Create a file in the ./src/settings folder named dialog.js and add the following code. Note that this code uses jQuery to register events and uses the
messageParent function to send the user's choices back to the caller.
Update webpack config settings
Finally, open the file webpack.config.js file in the root directory of the project and complete the following steps.
Fetch data from GitHub
The dialog.js file you just created specifies that the add-in should load gists when the
change event fires for the GitHub username field. To retrieve the user's gists from GitHub, you'll use the GitHub Gists API.
Within the ./src folder, create a new subfolder named helpers. In the ./src/helpers folder, create a file named gist-api.js, and add the following code to retrieve the user's gists from GitHub and build the list of gists.
Note
You may have noticed that there's no button to invoke the settings dialog. Instead, the add-in will check whether it has been configured when the user selects either the Insert default gist button or the Insert gist button. If the add-in has not yet been configured, the settings dialog will prompt the user to configure before proceeding.
Microsoft Office MacImplement a UI-less button
This add-in's Insert default gist button is a UI-less button that will invoke a JavaScript function, rather than open a task pane like many add-in buttons do. When the user selects the Insert default gist button, the corresponding JavaScript function will check whether the add-in has been configured.
Update the function file (HTML)
A function that's invoked by a UI-less button must be defined in the file that's specified by the
FunctionFile element in the manifest for the corresponding form factor. This add-in's manifest specifies https://localhost:3000/commands.html as the function file.
Open the file ./src/commands/commands.html and replace the entire contents with the following markup.
Update the function file (JavaScript)
Open the file ./src/commands/commands.js and replace the entire contents with the following code. Note that if the
insertDefaultGist function determines the add-in has not yet been configured, it adds the ?warn=1 parameter to the dialog URL. Doing so makes the settings dialog render the message bar that's defined in ./settings/dialog.html, to tell the user why they're seeing the dialog.
Create a file to manage configuration settings
The HTML function file references a file named addin-config.js, which doesn't yet exist. Create a file named addin-config.js in the ./src/helpers folder and add the following code. This code uses the RoamingSettings object to get and set configuration values.
Create new functions to process gists
Next, open the ./src/helpers/gist-api.js file and add the following functions. Note the following:
Test the button
Save all of your changes and run
npm run dev-server from the command prompt, if the server isn't already running. Then complete the following steps to test the Insert default gist button.
Implement a task pane
This add-in's Insert gist button will open a task pane and display the user's gists. The user can then select one of the gists to insert into the body of the message. If the user has not yet configured the add-in, they will be prompted to do so.
Specify the HTML for the task pane
In the project that you've created, the task pane HTML is specified in the file ./src/taskpane/taskpane.html. Open that file and replace the entire contents with the following markup.
Specify the CSS for the task pane
In the project that you've created, the task pane CSS is specified in the file ./src/taskpane/taskpane.css. Open that file and replace the entire contents with the following code.
Specify the JavaScript for the task pane
In the project that you've created, the task pane JavaScript is specified in the file ./src/taskpane/taskpane.js. Open that file and replace the entire contents with the following code.
Test the button
Save all of your changes and run
npm run dev-server from the command prompt, if the server isn't already running. Then complete the following steps to test the Insert gist button.
Next steps
In this tutorial, you've created an Outlook add-in that can be used in message compose mode to insert content into the body of a message. To learn more about developing Outlook add-ins, continue to the following article:
-->
Use VBA add-ins and macros that you developed for Office for Windows with Office for Mac.
Applies to: Excel for Mac | PowerPoint for Mac | Word for Mac | Office 2016 for Mac
![]()
If you are authoring Macros for Office for Mac, you can use most of the same objects that are available in VBA for Office. For information about VBA for Excel, PowerPoint, and Word, see the following:
Note
Outlook for Mac and OneNote for Mac do not support VBA.
Office 2016 for Mac is sandboxed
Unlike other versions of Office apps that support VBA, Office 2016 for Mac apps are sandboxed.
Sandboxing restricts the apps from accessing resources outside the app container. This affects any add-ins or macros that involve file access or communication across processes. You can minimize the effects of sandboxing by using the new commands described in the following section.
Creating an installer or putting user content
For instructions on creating an installer for your add-in, please refer to the article here: Installing User Content in Office 2016 for Mac
New VBA commands for Office 2016 for Mac
The following VBA commands are new and unique to Office 2016 for Mac.
Microsoft Office Mac Font Tutorial FreeRibbon customization in Office for Mac
Office 2016 for Mac supports ribbon customization using Ribbon XML. Note that there are some differences in ribbon support in Office 2016 for Mac and Office for Windows.
idMSOs compatible with Office 2016 for Mac
For information about the idMSOs that are compatible with Office 2016 for Mac, see the following:
See alsoMicrosoft Free Tutorials Microsoft OfficeSupport and feedbackMicrosoft Office Fonts Download
Have questions or feedback about Office VBA or this documentation? Please see Office VBA support and feedback for guidance about the ways you can receive support and provide feedback.
Comments are closed.
|
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |