How to set outlook addins pinned right away?
I set the SupportsPinning to true for outlook addins by modifying the manifest file as shown below. This allows the pin icon available. By default, the Pin is not selected. So is there a way to have the addins PINNED right away?
<!-- Task pane button -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
......
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="readTaskPaneUrl" />
<SupportsPinning>true</SupportsPinning>
</Action>
</Control>
1 answer
-
answered 2022-05-07 19:25
Eugene Astafiev
Nope. Users are responsible for pinning the task pane. The add-in just provides such ability. I'd suggest filing a feature request at https://aka.ms/M365dev-suggestions .
do you know?
how many words do you know
See also questions close to this topic
- Outlook VSTO - Get all items in a group calendar
-
Send SVG image content to email as HTML using boto3
I want to send SVG content (without saved file) as HTML to Outlook email address. This SVG content works fine in browser showing a circle image, however sending it via boto3.client to Outlook email results in empty mail. Why? Any suggestions appreciated.
import io import json import boto3 from botocore.exceptions import ClientError SENDER = "Name1 LastName1 <Name1.LastName1@mail.com>" RECIPIENT = "Name2 LastName2 <Name2.LastName2@mail.com>" AWS_REGION = "us-east-1" SUBJECT = "something" svg = """ <svg width="100" height="100"> <circle cx="50" cy="50" r="40" stroke="green" stroke-width="4" fill="yellow" /> </svg> """ BODY_HTML = f"""<html> <body> {svg} </body> </html> """ CHARSET = "UTF-8" client = boto3.client('ses',region_name=AWS_REGION) try: response = client.send_email( Destination={ 'ToAddresses': [ RECIPIENT ], }, Message={ 'Body': { 'Html': { 'Charset': CHARSET, 'Data': BODY_HTML } }, 'Subject': { 'Charset': CHARSET, 'Data': SUBJECT }, }, Source=SENDER ) except ClientError as e: print(e.response['Error']['Message']) else: print("Email sent! Message ID:"), print(response['MessageId'])
-
Replacing text in a chart title
I'm afraid there's no code in this question, but I'm looking for feedback. I have a VBA addin called FlexFind (https://jkp-ads.com/excel-flexfind.asp) which I am currently trying to port to office-js.
One of the things you can do with the VBA add-in is search and replace in chart titles. The VBA tool is smart enough to detect if a chart title contains a formula to a cell. That means replacing in that chart title is only feasible if the tool is set to look in formulas. It will search and replace in the chart title's formula instead. Also, if the tool is set to S&R in Values, it ignores chart titles with a formula. As it should.
How would I detect a chart title with a formula in office-js as there appears to be no method or property to read the chart title formula?
-
Outlook add-in not working unless cache is disabled
I'm working on an add-in and everything works fine, if I have the console open. If I close the console and try to access my add-in in the ribbon, I always get and error in my home made library. It looks like it's not loaded properly or it's already created and throwing an error.
Here's the error stack:
Uncaught Sys.ArgumentTypeException: Sys.ArgumentTypeException: Object of type 'System.Security.Cryptography.CryptoStreamMode' cannot be converted to type 'System.Security.Cryptography.CryptoStreamMode'. Parameter name: method at Function.Error.create (https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js:5:2732) at Function.Error.argumentType (https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js:5:3900) at Function._validateParameterType (https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js:5:1739) at Function._validateParameter (https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js:5:1080) at Function._validateParams (https://ajax.aspnetcdn.com/ajax/3.5/MicrosoftAjax.js:5:629) at Microsoft_Office_Common_ServiceEndPoint$registerMethod [as registerMethod] (https://appsforoffice.microsoft.com/lib/1.1/hosted/outlook-web-16.01.debug.js:4273:26) at OSF_InitializationHelper$setAgaveHostCommunication [as setAgaveHostCommunication] (https://appsforoffice.microsoft.com/lib/1.1/hosted/outlook-web-16.01.debug.js:5707:41) at OSF__OfficeAppFactory_initialize$onAppCodeAndMSAjaxReady (https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js:1825:39) at validateFunction (https://appsforoffice.microsoft.com/lib/1.1/hosted/office.debug.js:350:21)
It's hard to debug because I have a hard time trying to get the error while the console is open and it happens all the time when it's closed.
I was wondering if there was a specific way to include libraries in an outlook web add-in? Or maybe can I preload my library every time? Maybe it's already created and I don't need to create it?
-
Outlook VSTO - Allow specific AD group to see ribbon
How can I programmatically restrict the VSTO Add-in Ribbon visibility to a specific AD group only? Can this be controlled directly from the Ribbon XML itself? The plugin is distributed to entire org, but need the ribbon visibility to change by AD group
-
'Preauthorization missing.' error when trying to get Access Token from Outlook AddIn
I am making an Outlook add-in in React and when trying to get the access token from OfficeRuntime, I get the following error:
This is the method I am trying to run:
var bootToken = OfficeRuntime.auth.getAccessToken({ allowSignInPrompt: true });
This is the error in the browser console:
OSF.DDA.Error {name: 'Preauthorization missing.', message: 'Missing grant for this add-in.', code: 13005} code: 13005 message: "Missing grant for this add-in." name: "Preauthorization missing."
This is my manifest.xml file:
<?xml version="1.0" encoding="UTF-8" standalone="yes"?> <OfficeApp xmlns="http://schemas.microsoft.com/office/appforoffice/1.1" xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0" xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0" xsi:type="MailApp"> <Id>{AppId}</Id> <Version>1.0.0.0</Version> <ProviderName>Signator</ProviderName> <DefaultLocale>en-US</DefaultLocale> <DisplayName DefaultValue="Signator Demo"/> <Description DefaultValue="Signator demo"/> <IconUrl DefaultValue="https://localhost:3000/assets/icon-64.png"/> <HighResolutionIconUrl DefaultValue="https://localhost:3000/assets/icon-128.png"/> <SupportUrl DefaultValue="https://www.contoso.com/help"/> <AppDomains> <AppDomain>https://www.contoso.com</AppDomain> </AppDomains> <Hosts> <Host Name="Mailbox"/> </Hosts> <Requirements> <Sets> <Set Name="Mailbox" MinVersion="1.1"/> </Sets> </Requirements> <FormSettings> <Form xsi:type="ItemRead"> <DesktopSettings> <SourceLocation DefaultValue="https://localhost:3000/taskpane.html"/> <RequestedHeight>250</RequestedHeight> </DesktopSettings> </Form> </FormSettings> <Permissions>ReadWriteItem</Permissions> <Rule xsi:type="RuleCollection" Mode="Or"> <Rule xsi:type="ItemIs" ItemType="Message" FormType="Read"/> </Rule> <DisableEntityHighlighting>false</DisableEntityHighlighting> <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0"> <Requirements> <bt:Sets DefaultMinVersion="1.3"> <bt:Set Name="Mailbox"/> </bt:Sets> </Requirements> <Hosts> <Host xsi:type="MailHost"> <DesktopFormFactor> <FunctionFile resid="Commands.Url"/> <ExtensionPoint xsi:type="MessageReadCommandSurface"> <OfficeTab id="TabDefault"> <Group id="msgReadGroup"> <Label resid="GroupLabel"/> <Control xsi:type="Button" id="msgReadOpenPaneButton"> <Label resid="TaskpaneButton.Label"/> <Supertip> <Title resid="TaskpaneButton.Label"/> <Description resid="TaskpaneButton.Tooltip"/> </Supertip> <Icon> <bt:Image size="16" resid="Icon.16x16"/> <bt:Image size="32" resid="Icon.32x32"/> <bt:Image size="80" resid="Icon.80x80"/> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="Taskpane.Url"/> </Action> </Control> </Group> </OfficeTab> </ExtensionPoint> </DesktopFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/> <bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/> <bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/> </bt:Images> <bt:Urls> <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/> </bt:Urls> <bt:ShortStrings> <bt:String id="GroupLabel" DefaultValue="Signator Add-in"/> <bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/> </bt:ShortStrings> <bt:LongStrings> <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/> </bt:LongStrings> </Resources> <VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1"> <Requirements> <bt:Sets DefaultMinVersion="1.3"> <bt:Set Name="Mailbox"/> </bt:Sets> </Requirements> <Hosts> <Host xsi:type="MailHost"> <DesktopFormFactor> <FunctionFile resid="Commands.Url"/> <ExtensionPoint xsi:type="MessageReadCommandSurface"> <OfficeTab id="TabDefault"> <Group id="msgReadGroup"> <Label resid="GroupLabel"/> <Control xsi:type="Button" id="msgReadOpenPaneButton"> <Label resid="TaskpaneButton.Label"/> <Supertip> <Title resid="TaskpaneButton.Label"/> <Description resid="TaskpaneButton.Tooltip"/> </Supertip> <Icon> <bt:Image size="16" resid="Icon.16x16"/> <bt:Image size="32" resid="Icon.32x32"/> <bt:Image size="80" resid="Icon.80x80"/> </Icon> <Action xsi:type="ShowTaskpane"> <SourceLocation resid="Taskpane.Url"/> </Action> </Control> </Group> </OfficeTab> </ExtensionPoint> </DesktopFormFactor> </Host> </Hosts> <Resources> <bt:Images> <bt:Image id="Icon.16x16" DefaultValue="https://localhost:3000/assets/icon-16.png"/> <bt:Image id="Icon.32x32" DefaultValue="https://localhost:3000/assets/icon-32.png"/> <bt:Image id="Icon.80x80" DefaultValue="https://localhost:3000/assets/icon-80.png"/> </bt:Images> <bt:Urls> <bt:Url id="Taskpane.Url" DefaultValue="https://localhost:3000/taskpane.html"/> </bt:Urls> <bt:ShortStrings> <bt:String id="GroupLabel" DefaultValue="Signator Add-in"/> <bt:String id="TaskpaneButton.Label" DefaultValue="Show Taskpane"/> </bt:ShortStrings> <bt:LongStrings> <bt:String id="TaskpaneButton.Tooltip" DefaultValue="Opens a pane displaying all available properties."/> </bt:LongStrings> </Resources> <WebApplicationInfo> <Id>{AppId}</Id> <Resource>api://localhost:3000/{AppId}</Resource> <Scopes> <Scope>openid</Scope> <Scope>profile</Scope> <Scope>offline_access</Scope> <Scope>Files.Read.All</Scope> <Scope>User.Read</Scope> <Scope>email</Scope> <Scope>access_as_user</Scope> </Scopes> </WebApplicationInfo> </VersionOverrides> </VersionOverrides> </OfficeApp>
This is my .env file:
CLIENT_ID=6fd14366-13ed-4a8d-8563-0f89e8428f43 GRAPH_URL_SEGMENT_=/me NODE_ENV=development PORT=3000 QUERY_PARAM_SEGMENT= SCOPE=access_as_user
I also have declared a scope 'access_as_user' and generated a client secret, added all possible client apps, enabled authorization and sso and set the app to be multi tenant.
What could be the problem why do I get the error that 'Preauthorization is missing' (code 13005)?
-
Officejs "System.Security.Cryptography.CryptoStreamMode" bug
I am developing an outlook add-in and I ran into a bug that I cannot understand.
When my add-in is loaded I get this error : "Object of type 'System.Security.Cryptography.CryptoStreamMode' cannot be converted to type 'System.Security.Cryptography.CryptoStreamMode'"
I can only access my add-in when I open the console and disable de network cache, otherwise I always get this error.
I was able to get a different error by changing the import order in my html file.
I was wondering if there was a solution to this problem or is there an order that I'm not aware of for imports?
-
Office.Recipients (interface) getAsync: In OWA, the To field is not resolved after losing the field focus
The "getAsync" function of the office recipient interface returns resolved recipients.
In case a recipient is not resolved, this recipient won't be returned by this function.
We find a way/bug how to add a recipient that won't be properly resolved.
In case an outlook user enter an email address (without clicking on the outlook recipient proposals, without pressing tab/space or ";") and then click on another field (change field focus), for example by pressing on the messsage body, the content of the To field is not resolved.
In case the field focus is lost, the content of the fields should be resolved.
We have tested this behaviour with the Script Lab Add-in and we could confirm the issue.
In addition, we could notice that if we set a new recipient using the setAsync or addAsync method, the start content of the to field is not resolved, only the new added email adress is validated.
Our suggestions:
- The set method should remove the start content or resolved the start email address also.
- The main issue is the missing "resolve" on field focus lost.
Our question:
Why the field is not resolved after field focus change?
How is it possible to get the recipient value in this specific case ?
-
Microsoft JavaScript Add-in Clear Static website cache
We have 2 Microsoft add-ins written using the Office JS framework.As we understand we are loading the static website (taskpane.html) whenever the pane is loaded.
Changes to our plugin are mostly cosmetic, and due to that we usually do not update the version of the plugin, and just push a new version of code to the bucket hosting the static website.
The issue we are facing is with caching of the build bundle, unless we manually clear the cache using developer tools, we do not get the updated website inside the plugin pane.
We have disabled the caching at S3 end to return Cache-Control header value as no-cache, but even after that I see http status code 304 on plugin refresh against the task.html code.
Are we supposed to distribute a new version of plugin event for website updates ?