Skip to content

Commit 4dcebec

Browse files
author
jdeigendesch
committed
Created backstage ribbon
1 parent 57210e3 commit 4dcebec

2 files changed

Lines changed: 57 additions & 3 deletions

File tree

OutlookAddIn-Example/OutlookAddIn-Example/Resources/Ribbon.xml

Lines changed: 32 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,9 +4,9 @@
44

55
<ribbon>
66
<tabs>
7-
<!--Email-Tab-->
7+
<!--Email-Tab (Create new mail to see this button)-->
88
<tab idMso="TabNewMailMessage">
9-
<group id="GroupMail" getLabel="Group_GetLabel">
9+
<group id="GroupSmileMail" getLabel="Group_GetLabel">
1010
<button id="SmileButton"
1111
size="large"
1212
getImage="Button_GetImage"
@@ -18,5 +18,35 @@
1818
</tabs>
1919
</ribbon>
2020

21+
<backstage>
22+
<tab id="TabSmileys" getLabel="TabSmileys_GetLabel" columnWidthPercent="30" insertAfterMso="TabPrint"
23+
visible="true">
24+
25+
<firstColumn>
26+
<group id="grpSeperator">
27+
</group>
28+
29+
<group id="GroupSmileBackstage" getLabel="Group_GetLabel" getHelperText="Group_GetHelperText">
30+
<primaryItem>
31+
<button id="buttonSmile" getLabel="Button_GetLabel" getImage="Button_GetImage" onAction="Button_Click" />
32+
</primaryItem>
33+
</group>
34+
</firstColumn>
35+
36+
<secondColumn>
37+
38+
<group id="grpInfo" getLabel="GroupInfo_GetLabel">
39+
<topItems>
40+
<labelControl id="lblInfo" getLabel="Info_GetLabel" />
41+
<hyperlink id="linkDownload" getLabel="LinkDownload_GetLabel"
42+
target="https://github.com/jdeigendesch/OutlookAddIn-Example" />
43+
</topItems>
44+
</group>
45+
46+
</secondColumn>
47+
48+
</tab>
49+
</backstage>
50+
2151

2252
</customUI>

OutlookAddIn-Example/OutlookAddIn-Example/Ribbon.cs

Lines changed: 25 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,15 @@
44
using Office = Microsoft.Office.Core;
55

66
namespace OutlookAddIn_Example {
7-
87
[ComVisible(true)]
98
public class Ribbon : Office.IRibbonExtensibility {
109
private const string GroupSmile = "Smileys";
1110
private const string Smile = "Smile";
1211
private const string TooltipSmile = "This is a tooltip to smile.";
12+
private const string HelperSmile = "Don't forget to smile!";
13+
private const string GroupInfo = "Info";
14+
private const string Info = "Some information about this Outlook Add-In ...";
15+
private const string GithubExample = "GitHub-Example";
1316

1417
private Office.IRibbonUI _ribbon;
1518

@@ -49,6 +52,27 @@ public string Button_GetLabel(Office.IRibbonControl control) {
4952
return Smile;
5053
}
5154

55+
public string Group_GetHelperText(Office.IRibbonControl control) {
56+
return HelperSmile;
57+
}
58+
59+
public string GroupInfo_GetLabel(Office.IRibbonControl control) {
60+
return GroupInfo;
61+
}
62+
63+
public string Info_GetLabel(Office.IRibbonControl control) {
64+
return Info;
65+
}
66+
67+
68+
public string TabSmileys_GetLabel(Office.IRibbonControl control) {
69+
return GroupSmile;
70+
}
71+
72+
public string LinkDownload_GetLabel(Office.IRibbonControl control) {
73+
return GithubExample;
74+
}
75+
5276
#endregion
5377
}
5478
}

0 commit comments

Comments
 (0)