none
CustomUI ShareWithPeople and MailMergeMergeToEMail is not working. RRS feed

  • Question

  • Hello. I'm Mr. Song. 

    I'm trying to make a product related office. 

    Some function is not working. 

    That is about CustomUI. 

    1. office 2016 ShareWithPeople UI disable is not working. but 2013 is working correctly. 

    I coded in Ribbon.xml  <command idMso="ShareWithPeople" enabled="false"/>

    2. office 2007, 2010 MailMergeMergeToEMail UI disable is not working. But 2013, 2016 is working correctly

        <command idMso="MailMergeMergeToEMail" enabled="false"/>

    thank you.

    Wednesday, May 18, 2016 1:32 AM

Answers

  • Hi Song,

    >>1. office 2016 ShareWithPeople UI disable is not working. but 2013 is working correctly.
    I coded in Ribbon.xml  <command idMso="ShareWithPeople" enabled="false"/>

    The idMso is wrong. In Office2013,it is “ShareWithPeople”, but in office 2016,it should be “ShareWithPeopleFromSharePane”.
    You can download these help files from Microsoft Download Centre. Here are the links. Office 2013 help files & Office 2016 help files

    >>2. office 2007, 2010 MailMergeMergeToEMail UI disable is not working. But 2013, 2016 is working correctly
    <command idMso="MailMergeMergeToEMail" enabled="false"/>

    What is your project, application level or document level? What is the ribbon xml you used? How did you use add-in in multiple Office version?

    I made a test with below ribbon.xml, it works correctly at Office 2010, but failed in Office 2007.

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <commands>
    <command idMso="MailMergeMergeToEMail" enabled="false"/>
    </commands>	
    </customUI>

    To make it work in Office 2007, you could try the ribbon.xml below:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    	<commands>
    		<command idMso="MailMergeMergeToEMail" enabled="false"/> 
    	</commands>
    </customUI>

    Office 2007 uses a different namespace from Office 2013.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    Thursday, May 19, 2016 6:44 AM

All replies

  • Hi Song,

    >>1. office 2016 ShareWithPeople UI disable is not working. but 2013 is working correctly.
    I coded in Ribbon.xml  <command idMso="ShareWithPeople" enabled="false"/>

    The idMso is wrong. In Office2013,it is “ShareWithPeople”, but in office 2016,it should be “ShareWithPeopleFromSharePane”.
    You can download these help files from Microsoft Download Centre. Here are the links. Office 2013 help files & Office 2016 help files

    >>2. office 2007, 2010 MailMergeMergeToEMail UI disable is not working. But 2013, 2016 is working correctly
    <command idMso="MailMergeMergeToEMail" enabled="false"/>

    What is your project, application level or document level? What is the ribbon xml you used? How did you use add-in in multiple Office version?

    I made a test with below ribbon.xml, it works correctly at Office 2010, but failed in Office 2007.

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">
    <commands>
    <command idMso="MailMergeMergeToEMail" enabled="false"/>
    </commands>	
    </customUI>

    To make it work in Office 2007, you could try the ribbon.xml below:

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">
    	<commands>
    		<command idMso="MailMergeMergeToEMail" enabled="false"/> 
    	</commands>
    </customUI>

    Office 2007 uses a different namespace from Office 2013.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.




    Thursday, May 19, 2016 6:44 AM
  • Thank you. Edward. (My Project is application level. )

    It solved two problems, thanks to all for your help.

    >>1. office 2016 ShareWithPeople UI disable is not working. but 2013 is working correctly. 
    I coded in Ribbon.xml  <command idMso="ShareWithPeople" enabled="false"/>

     - After changing the idMso, It works well.

     <command idMso="ShareWithPeopleFromSharePane" enabled="false" onAction="OnCommand"/>


    >>2. office 2007, 2010 MailMergeMergeToEMail UI disable is not working. But 2013, 2016 is working correctly

    I separated projects to two type VSTO add-in 

    1. old version schema

    <customUI xmlns="http://schemas.microsoft.com/office/2006/01/customui">

    2. old version schema

    <customUI xmlns="http://schemas.microsoft.com/office/2009/07/customui">

    and then, I installed to target PC 2 Types vsto project all. 

    It work well. 

    as my test result,  There was no way that can be both compatible with one project from 2007 to 2016

    (if you know how to implement two types xml to one vsto project, please let me know.. )

    almost UI I wanted to block are blocked thanks to your help.

    now there are some other mission.

    1. block adding COM Add-in from other process. 

    2. office 2007 toolbar control. (It seems idMso is not shared in 2007 office). so I will solve it another way(hooking toolbar or transparent control override on the toolbar dynamically)

    a bit of help would appreciate to me. 

    thanks.

    Best Regards, 

    Mr Song. 



    • Edited by songwh84 Friday, May 27, 2016 6:45 AM
    Friday, May 27, 2016 6:43 AM
  • Hi,

    I am glad your original issue has been resolved, and I would suggest you mark the helpful reply as answer to close this thread.

    For new issues, I would suggest you post new threads for new issues, and then we could focus on new special issues.

    Best Regards,

    Edward


    We are trying to better understand customer views on social support experience, so your participation in this interview project would be greatly appreciated if you have time. Thanks for helping make community forums a great place.
    Click HERE to participate the survey.


    Friday, May 27, 2016 9:42 AM