简体   繁体   English

Outlook 加载时未显示 VSTO 功能区加载项选项卡

[英]Outlook VSTO ribbon add-in tab not showing on load

I've created an add-in that consist of a ribbon and three tabs.我创建了一个包含功能区和三个选项卡的加载项。 Background to build: The ribbon is built using designer and not xml. The primary use of these is to allow quick opening of various email templates.构建背景:功能区是使用设计器而不是 xml 构建的。这些的主要用途是允许快速打开各种 email 模板。 Tab0 adds a couple buttons to the built in TabMail Tab1 is a new custom tab with various buttons that do various things. Tab0 向内置的 TabMail 添加了几个按钮 Tab1 是一个新的自定义选项卡,其中包含执行各种操作的各种按钮。 Tab2 is a reduced version of Tab1 for use by users of our subsidiary company but pointing to alternatively branded templates. Tab2 是 Tab1 的简化版本,供我们子公司的用户使用,但指向替代品牌模板。 In the coding, Tab1 and Tab2's visibility is set based on user AD group membership on ribbon load event.在编码中,Tab1 和 Tab2 的可见性是根据功能区加载事件上的用户 AD 组成员身份设置的。 This has been tested and works.这已经过测试并且有效。 Tab0 always is merged with the built in Home tab shows as expected. Tab0 始终按预期与内置的“主页”选项卡显示合并。

Developers and template admins like me should see all tabs.像我这样的开发人员和模板管理员应该可以看到所有选项卡。 This also works using same methods.这也适用于使用相同的方法。

Current issue: Recently and I think after a certain office 365 update (but not 100% which), Tab1 no longer shows for anyone that should see it on load.当前问题:最近,我认为在某个 Office 365 更新(但不是 100%)之后,Tab1 不再显示给任何应该在加载时看到它的人。 However the tab has loaded somewhere.但是该选项卡已加载到某处。 The reason I know this is because to fix this bug all I have to do is minimise the ribbon the re-maximise.我之所以知道这是因为要修复此错误,我所要做的就是最小化功能区并重新最大化。 Both additional tabs are instantly visible.两个附加选项卡都立即可见。

Please note, I do not have to disable and the re-enable the actual add-in.请注意,我不必禁用并重新启用实际的加载项。

I can also confirm that the Ribbon Type is set correctly (Microsoft.Outlook.Explorer) so please, no reply along those lines either.我还可以确认色带类型设置正确 (Microsoft.Outlook.Explorer) 所以请不要按照这些行回复。

I have trawled the web and cannot seem to find an explanation or fix for this behaviour.我已经搜索了 web,但似乎找不到对此行为的解释或修复。 I'm hoping someone has seen this before and might point me in the right direction.我希望有人以前看过这个并且可能会指出我正确的方向。

To replicate, I've seen it happen by just creating a new simple ribbon project and creating a new custom tab.要复制,我已经看到它只是通过创建一个新的简单功能区项目并创建一个新的自定义选项卡来实现的。 Then create a second tab by copying the first, giving it a diff ID.然后通过复制第一个选项卡创建第二个选项卡,给它一个差异 ID。

eg Ribbon on App Launch/Load - Tab01 Missing例如应用程序启动/加载功能区 - Tab01 缺失

Ribbon on minimise - Tab01 Appears功能区最小化 - Tab01 出现

Ribbon on maximised- Tab01 still visible最大化功能区 - Tab01 仍然可见

Still have no idea why this happens but i have found a work around for those that have experiences the same issue.仍然不知道为什么会发生这种情况,但我为那些遇到相同问题的人找到了解决方法。

The issue seems to affect the first custom tab only.该问题似乎仅影响第一个自定义选项卡。 So if you add a new blank custom tab and set its visibility to false, this inherits this bug allowing the other to function properly.因此,如果您添加一个新的空白自定义选项卡并将其可见性设置为 false,则会继承此错误,从而允许另一个正常运行。

Its a bit of a dirty fix but work well.它有点脏,但效果很好。

Would still be interested in an actual fix if anyone knows one though.如果有人知道,仍然会对实际修复感兴趣。

This happens because you had added control to your ribbon perhaps a property to the Control which you should not.发生这种情况是因为您已将控件添加到功能区,也许是您不应该添加到 Control 的属性。

An example is when you add a Ribbon Gallery control to your Ribbon and change its "PositionType" property from Default to another value.例如,当您将功能区库控件添加到功能区并将其“PositionType”属性从默认值更改为另一个值时。

This results in the Ribbon not showing.这导致功能区不显示。

Or perhaps you should check the last code you added to your project或者您也许应该检查您添加到项目中的最后代码

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM