简体   繁体   中英

Outllook 2016 - VSTO plugin - clicking on Ribbon controls causes outlook crash

Clicking on custom ribbon control causes outlook to crash.

The Event listener for the control never gets invoked.

Reproducible for all types of Ribbon controls - RibbonButton , RibbonCheckbox.

RibbonType - "Microsoft.Outlook.Mail.Read" reproducible for others too.

主菜单中的功能区

Problem specific to Outlook 2016, not reproducible for 2013.

Outlook version number: 16.0.7167.2040 (latest - part of Office 365)

Steps to reproduce:

  1. Create New project - "Outlook 2013 and 2016 VSTO add-in".

  2. Add New Ribbon using designer. (default type is mail read ribbon).

  3. Add new button - "Important Button" and register listener.

  4. Run -> Outlook -> Home -> Add-Ins -> click "Important Button"

Have checked offCat confing and live loggin - nothing there.

Any pointers on what I am missing here? Any pointers on how to find what exactly is going wrong.

Edit: Found this in Event Log under Windows Logs -> Applications

<Event xmlns="http://schemas.microsoft.com/win/2004/08/events/event">
- <System>
      <Provider Name="Application Error" /> 
      <EventID Qualifiers="0">1000</EventID> 
      <Level>2</Level> 
      <Task>100</Task> 
      <Keywords>0x80000000000000</Keywords> 
      <TimeCreated SystemTime="2016-09-06T04:51:22.000000000Z" /> 
      <EventRecordID>247449</EventRecordID> 
      <Channel>Application</Channel> 
      <Computer>USER</Computer> 
      <Security /> 
  </System>
- <EventData>
      <Data>OUTLOOK.EXE</Data> 
      <Data>16.0.7167.2040</Data> 
      <Data>57ad490b</Data> 
      <Data>mso40uiwin32client.dll</Data> 
      <Data>0.0.0.0</Data> 
      <Data>57ab7885</Data> 
      <Data>c0000005</Data> 
      <Data>000ce501</Data> 
      <Data>107c</Data> 
      <Data>01d207f98604f7ee</Data> 
      <Data>C:\Program Files (x86)\Microsoft Office\root\Office16\OUTLOOK.EXE</Data> 
      <Data>C:\Program Files (x86)\Common Files\Microsoft Shared\Office16\mso40uiwin32client.dll</Data> 
      <Data>8e19d2e5-73ed-11e6-8343-34e6d7290fdd</Data> 
      <Data /> 
      <Data /> 
  </EventData>
  </Event>

I am agree with Shyam sundar shah .It will be better to use Ribbon(xml). you can modify the ribbon.xml like this.

<?xml version="1.0" encoding="UTF-8"?>
<customUI onLoad="Ribbon_Load" xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    <ribbon>
      <tab idMso="TabNewMailMessage">
        <group id="ImportantGroup" label="Important Group" insertAfterMso="GroupIncludeMainTab">
          <button id="ImportantButton" label="Important Button" onAction="ImportantButton_Click"/>
        </group>
      </tab>
    </ribbon>
</customUI>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

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