Friday, 15 January 2010

c# - Custom Ribbon in Outlook VSTO goes 'missing' if not in VSTO project's root? -



c# - Custom Ribbon in Outlook VSTO goes 'missing' if not in VSTO project's root? -

i have bare bones vsto outlook add-in. i've added empty ribbon via article , works.

the ribbon.cs , ribbon.xml files reside in project's root if move them sub folder (say addin\ribbon) there no compile errors when run outlook addin's ribbon missing. playing around it, appears ribbon.xml must remain in project's root ribbon appear.

i don't understand behavior; there setting or manually references addin's ribbon location?

thanks!

i figured out after fresh look: after adding new ribbon (xml) item, there generated function getcustomui uses path xml file look-up key in assembly's resources file.

so when moving file, should alter phone call getresourcetext this:

homecoming getresourcetext("myaddin.ribbon.xml");

to this:

homecoming getresourcetext("myaddin.ribbons.ribbon.xml");

you need because xml file linked resource in project file should have line this:

<embeddedresource include="ribbons\ribbon.xml" />

c# vsto outlook-addin outlook-2010

No comments:

Post a Comment