user3771409
user3771409

Reputation: 41

Can't change default icon of TaskpaneButton to custom image

I've faced with problem while trying to change standart icon to custom for TaskpaneButton on the ribbon of Office Word 2016.

I've added the specific images (Size: 16X16, 32X32, 80X80) to my project solution and changed path to images in manifest.

  <!-- Control. It can be of type "Button" or "Menu". -->
            <Control xsi:type="Button" id="Contoso.TaskpaneButton">
              <Label resid="Contoso.TaskpaneButton.Label"/>
              <Supertip>
                <!-- ToolTip title. resid must point to a ShortString resource. -->
                <Title resid="Contoso.TaskpaneButton.Label"/>
                <!-- ToolTip description. resid must point to a LongString resource. -->
                <Description resid="Contoso.TaskpaneButton.Tooltip"/>
              </Supertip>
              <Icon>
                <bt:Image size="16" resid="Contoso.tpicon_16x16"/>
                <bt:Image size="32" resid="Contoso.tpicon_32x32"/>
                <bt:Image size="80" resid="Contoso.tpicon_80x80"/>
              </Icon>  
            </Control>
          </Group>
        </OfficeTab>
      </ExtensionPoint>
    </DesktopFormFactor>
  </Host>
</Hosts> 
<Resources>
  <bt:Images>
    <bt:Image id="Contoso.tpicon_16x16"
              DefaultValue="http://localhost:1234/wa/Images/R16X16.png"/>
    <bt:Image id="Contoso.tpicon_32x32"
              DefaultValue="http://localhost:1234/wa/Images/R32X32.png"/>
    <bt:Image id="Contoso.tpicon_80x80"
              DefaultValue="http://localhost:1234/wa/Images/R80X80.png"/>
  </bt:Images>

But I see the default (blue hexagon) image after adding addin into the ribbon.

Btw. I've checked this in office online and mac versions It works fine and I can see my icons instead of default icons.

Also I've cleaned the caches of Office using "Office Upload Center" tool but the result is the same.

Can anyone to explain the main reason of this issue?

Upvotes: 3

Views: 181

Answers (1)

Humberto Lezama
Humberto Lezama

Reputation: 586

You need to use httpS to host the icons. Some platforms are more lax and don't enforce the requirement which is why you might see it working right now in Online.

Upvotes: 2

Related Questions