Im creating a custom add in using the yo office
command. I just want to know how i can change the icon on the outlook mail app. Ive. try everything but nothing works. Image Here
Asked
Active
Viewed 298 times
1

Eugene Astafiev
- 47,483
- 3
- 24
- 45

R. Mohammad
- 11
- 1
1 Answers
1
It seems you need to change the icon on the ribbon. For that you need to add an icon to your web app and define it in the resources section to which you can refer in the ribbon markup:
<!-- Define a control that calls a JavaScript function. -->
<Control xsi:type="Button" id="Button1Id1">
<Label resid="residLabel" />
<Tooltip resid="residToolTip" />
<Supertip>
<Title resid="residLabel" />
<Description resid="residToolTip" />
</Supertip>
<Icon>
<bt:Image size="16" resid="icon1_16x16" />
<bt:Image size="32" resid="icon1_32x32" />
<bt:Image size="80" resid="icon1_80x80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>getData</FunctionName>
</Action>
</Control>
The resources section from the manifest file may look like that:
<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>
<Resources>
Read more about that in the Add-in commands for Outlook article.

Eugene Astafiev
- 47,483
- 3
- 24
- 45
-
yes i already know that it, i literally can see the image, what i mean i the image links are working and when i try the outlook browser the icon are change and working. But on the outlook mail app ( desktop ) that icon does not change at all. – R. Mohammad Feb 01 '22 at 20:43
-
Have you tried clearing the browser cache to remove an old icon? – Eugene Astafiev Feb 01 '22 at 20:47
-
Yes. I already did but the issue is on the outlook browser but on outlook desktop , Check this image https://i.stack.imgur.com/uzrBH.png – R. Mohammad Feb 01 '22 at 20:57
-
You need to clear the add-ins cache folder (and browser which is used by Outlook). If it doesn't help try to remove the add-in and then install it back. – Eugene Astafiev Feb 01 '22 at 21:13
-
Yes already did that. everything from clearing the cache. re install it back. restart my laptop like everything. – R. Mohammad Feb 01 '22 at 21:18
-
Try to host the add-in on the server, i.e. change the URL of your web app. – Eugene Astafiev Feb 01 '22 at 22:40
-
The short answer is change the name/location of your icon. I.e. from http://contso.com/image.jpg to http://contoso.com/image2.jpg That will cause Outlook to redownload and update. The long answer is that outlook doesn't clear the cache of downloaded icons, can it can be cleared manually if you delete the WEF folder from C:\Users\[UserData]\AppData\Local\Microsoft\Office\16.0\Wef – Outlook Add-ins Team - MSFT Feb 07 '22 at 23:38