forked from OfficeDev/Outlook-Add-in-SSO
-
Notifications
You must be signed in to change notification settings - Fork 0
/
AttachmentDemo.xml
247 lines (229 loc) · 11.9 KB
/
AttachmentDemo.xml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
<?xml version="1.0" encoding="UTF-8"?>
<!--Created:ce44715c-8c4e-446b-879c-ea9ebe0f09c8-->
<OfficeApp
xmlns="http://schemas.microsoft.com/office/appforoffice/1.1"
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:bt="http://schemas.microsoft.com/office/officeappbasictypes/1.0"
xmlns:mailappor="http://schemas.microsoft.com/office/mailappversionoverrides/1.0"
xsi:type="MailApp">
<!-- Begin Basic Settings: Add-in metadata, used for all versions of Office unless override provided. -->
<Id>54ad5d2b-8352-46a7-8fc7-df772bbc5c9e</Id>
<!--Version. Updates from the store only get triggered if there is a version change. -->
<Version>1.0.0.0</Version>
<ProviderName>Outlook Dev Center</ProviderName>
<DefaultLocale>en-US</DefaultLocale>
<DisplayName DefaultValue="Save attachments to OneDrive" />
<Description DefaultValue="Saves attachments to your OneDrive"/>
<IconUrl DefaultValue="~remoteAppUrl/Images/add-in-icon-lo-res.png"/>
<HighResolutionIconUrl DefaultValue="~remoteAppUrl/Images/add-in-icon-hi-res.png"/>
<SupportUrl DefaultValue="https://github.com/OfficeDev/outlook-add-in-attachments-demo/issues" />
<AppDomains>
<AppDomain>https://login.microsoftonline.com</AppDomain>
</AppDomains>
<!--End Basic Settings. -->
<Hosts>
<Host Name="Mailbox" />
</Hosts>
<Requirements>
<Sets>
<Set Name="Mailbox" MinVersion="1.1" />
</Sets>
</Requirements>
<FormSettings>
<Form xsi:type="ItemRead">
<DesktopSettings>
<SourceLocation DefaultValue="~remoteAppUrl/MessageRead.html"/>
<RequestedHeight>250</RequestedHeight>
</DesktopSettings>
</Form>
</FormSettings>
<Permissions>ReadItem</Permissions>
<Rule xsi:type="RuleCollection" Mode="Or">
<Rule xsi:type="ItemIs" ItemType="Message" FormType="Read" />
</Rule>
<DisableEntityHighlighting>false</DisableEntityHighlighting>
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint -->
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- UI-less button to save all attachments -->
<Control xsi:type="Button" id="msgReadSaveAttachments">
<Label resid="saveAllAttachmentsLabel" />
<Supertip>
<Title resid="saveAllAttachmentsTitle" />
<Description resid="saveAllAttachmentsDesc" />
</Supertip>
<Icon>
<bt:Image size="16" resid="save-all-icon16" />
<bt:Image size="32" resid="save-all-icon32" />
<bt:Image size="64" resid="save-all-icon64" />
<bt:Image size="80" resid="save-all-icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>saveAllAttachments</FunctionName>
</Action>
</Control>
<!-- Open task pane to save individual attachments -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="open-pane-icon16" />
<bt:Image size="32" resid="open-pane-icon32" />
<bt:Image size="64" resid="open-pane-icon64" />
<bt:Image size="80" resid="open-pane-icon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="save-all-icon16" DefaultValue="~remoteAppUrl/Images/save-all-16.png"/>
<bt:Image id="save-all-icon32" DefaultValue="~remoteAppUrl/Images/save-all-32.png"/>
<bt:Image id="save-all-icon64" DefaultValue="~remoteAppUrl/Images/save-all-64.png"/>
<bt:Image id="save-all-icon80" DefaultValue="~remoteAppUrl/Images/save-all-80.png"/>
<bt:Image id="open-pane-icon16" DefaultValue="~remoteAppUrl/Images/open-pane-16.png"/>
<bt:Image id="open-pane-icon32" DefaultValue="~remoteAppUrl/Images/open-pane-32.png"/>
<bt:Image id="open-pane-icon64" DefaultValue="~remoteAppUrl/Images/open-pane-64.png"/>
<bt:Image id="open-pane-icon80" DefaultValue="~remoteAppUrl/Images/open-pane-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/MessageRead.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Save to OneDrive"/>
<bt:String id="saveAllAttachmentsLabel" DefaultValue="Save all attachments"/>
<bt:String id="saveAllAttachmentsTitle" DefaultValue="Save all attachments"/>
<bt:String id="paneReadButtonLabel" DefaultValue="Choose attachments"/>
<bt:String id="paneReadSuperTipTitle" DefaultValue="Choose attachments to save"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="saveAllAttachmentsDesc" DefaultValue="Saves all attachments to the Outlook Attachments folder in your OneDrive. This will overwrite any files that already exist with the same name."/>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane so you can choose which attachments to save."/>
</bt:LongStrings>
</Resources>
<!-- VersionOverrides v1.1 to add support for SSO -->
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides/1.1" xsi:type="VersionOverridesV1_1">
<Requirements>
<bt:Sets DefaultMinVersion="1.5">
<bt:Set Name="Mailbox" />
</bt:Sets>
</Requirements>
<Hosts>
<Host xsi:type="MailHost">
<DesktopFormFactor>
<!-- Location of the Functions that UI-less buttons can trigger (ExecuteFunction Actions). -->
<FunctionFile resid="functionFile" />
<!-- Message Read -->
<ExtensionPoint xsi:type="MessageReadCommandSurface">
<!-- Use the default tab of the ExtensionPoint -->
<OfficeTab id="TabDefault">
<Group id="msgReadGroup">
<Label resid="groupLabel" />
<!-- UI-less button to save all attachments -->
<Control xsi:type="Button" id="msgReadSaveAttachments">
<Label resid="saveAllAttachmentsLabel" />
<Supertip>
<Title resid="saveAllAttachmentsTitle" />
<Description resid="saveAllAttachmentsDesc" />
</Supertip>
<Icon>
<bt:Image size="16" resid="save-all-icon16" />
<bt:Image size="32" resid="save-all-icon32" />
<bt:Image size="64" resid="save-all-icon64" />
<bt:Image size="80" resid="save-all-icon80" />
</Icon>
<Action xsi:type="ExecuteFunction">
<FunctionName>saveAllAttachments</FunctionName>
</Action>
</Control>
<!-- Open task pane to save individual attachments -->
<Control xsi:type="Button" id="msgReadOpenPaneButton">
<Label resid="paneReadButtonLabel" />
<Supertip>
<Title resid="paneReadSuperTipTitle" />
<Description resid="paneReadSuperTipDescription" />
</Supertip>
<Icon>
<bt:Image size="16" resid="open-pane-icon16" />
<bt:Image size="32" resid="open-pane-icon32" />
<bt:Image size="64" resid="open-pane-icon64" />
<bt:Image size="80" resid="open-pane-icon80" />
</Icon>
<Action xsi:type="ShowTaskpane">
<SourceLocation resid="messageReadTaskPaneUrl" />
</Action>
</Control>
<!-- Go to http://aka.ms/ButtonCommands to learn how to add more Controls: ExecuteFunction and Menu -->
</Group>
</OfficeTab>
</ExtensionPoint>
<!-- Go to http://aka.ms/ExtensionPointsCommands to learn how to add more Extension Points: MessageRead, AppointmentOrganizer, AppointmentAttendee -->
</DesktopFormFactor>
</Host>
</Hosts>
<Resources>
<bt:Images>
<bt:Image id="save-all-icon16" DefaultValue="~remoteAppUrl/Images/save-all-16.png"/>
<bt:Image id="save-all-icon32" DefaultValue="~remoteAppUrl/Images/save-all-32.png"/>
<bt:Image id="save-all-icon64" DefaultValue="~remoteAppUrl/Images/save-all-64.png"/>
<bt:Image id="save-all-icon80" DefaultValue="~remoteAppUrl/Images/save-all-80.png"/>
<bt:Image id="open-pane-icon16" DefaultValue="~remoteAppUrl/Images/open-pane-16.png"/>
<bt:Image id="open-pane-icon32" DefaultValue="~remoteAppUrl/Images/open-pane-32.png"/>
<bt:Image id="open-pane-icon64" DefaultValue="~remoteAppUrl/Images/open-pane-64.png"/>
<bt:Image id="open-pane-icon80" DefaultValue="~remoteAppUrl/Images/open-pane-80.png"/>
</bt:Images>
<bt:Urls>
<bt:Url id="functionFile" DefaultValue="~remoteAppUrl/Functions/FunctionFile.html"/>
<bt:Url id="messageReadTaskPaneUrl" DefaultValue="~remoteAppUrl/MessageRead.html"/>
</bt:Urls>
<bt:ShortStrings>
<bt:String id="groupLabel" DefaultValue="Save to OneDrive"/>
<bt:String id="saveAllAttachmentsLabel" DefaultValue="Save all attachments"/>
<bt:String id="saveAllAttachmentsTitle" DefaultValue="Save all attachments"/>
<bt:String id="paneReadButtonLabel" DefaultValue="Choose attachments"/>
<bt:String id="paneReadSuperTipTitle" DefaultValue="Choose attachments to save"/>
</bt:ShortStrings>
<bt:LongStrings>
<bt:String id="saveAllAttachmentsDesc" DefaultValue="Saves all attachments to the Outlook Attachments folder in your OneDrive. This will overwrite any files that already exist with the same name."/>
<bt:String id="paneReadSuperTipDescription" DefaultValue="Opens a pane so you can choose which attachments to save."/>
</bt:LongStrings>
</Resources>
<WebApplicationInfo>
<Id>YOUR APP ID HERE</Id>
<Resource>api://localhost:44349/YOUR APP ID HERE</Resource>
<Scopes>
<Scope>user.read</Scope>
<Scope>files.readwrite</Scope>
<Scope>mail.read</Scope>
</Scopes>
</WebApplicationInfo>
</VersionOverrides>
</VersionOverrides>
</OfficeApp>