@@ -55,33 +55,6 @@ properties:
55
55
#### Examples
56
56
57
57
58
- ```TypeScript
59
-
60
- // The following code builds an HTML string with details of all attachments on the current item.
61
-
62
- const item = Office.context.mailbox.item;
63
-
64
- let outputString = "";
65
-
66
-
67
- if (item.attachments.length > 0) {
68
- for (let i = 0 ; i < item.attachments.length ; i++) {
69
- const attachment = item.attachments[i];
70
- outputString += "<BR>" + i + ". Name: ";
71
- outputString += attachment.name;
72
- outputString += "<BR>ID: " + attachment.id;
73
- outputString += "<BR>contentType: " + attachment.contentType;
74
- outputString += "<BR>size: " + attachment.size;
75
- outputString += "<BR>attachmentType: " + attachment.attachmentType;
76
- outputString += "<BR>isInline: " + attachment.isInline;
77
- }
78
- }
79
-
80
-
81
- console.log(outputString);
82
-
83
- ```
84
-
85
58
```TypeScript
86
59
87
60
// Link to full sample:
@@ -644,14 +617,6 @@ properties:
644
617
#### Examples
645
618
646
619
647
- ```TypeScript
648
-
649
- const location = Office.context.mailbox.item.location;
650
-
651
- console.log("location: " + location);
652
-
653
- ```
654
-
655
620
```TypeScript
656
621
657
622
// Link to full sample:
@@ -1403,92 +1368,6 @@ methods:
1403
1368
#### Examples
1404
1369
1405
1370
1406
- ```TypeScript
1407
-
1408
- // The following code passes a string to the `displayReplyAllForm` method.
1409
-
1410
- Office.context.mailbox.item.displayReplyAllForm('hello there');
1411
-
1412
- Office.context.mailbox.item.displayReplyAllForm('<b>hello there</b>');
1413
-
1414
-
1415
- // Reply with an empty body.
1416
-
1417
- Office.context.mailbox.item.displayReplyAllForm({});
1418
-
1419
-
1420
- // Reply with just a body.
1421
-
1422
- Office.context.mailbox.item.displayReplyAllForm(
1423
-
1424
- {
1425
-
1426
- 'htmlBody' : 'hi'
1427
-
1428
- });
1429
-
1430
-
1431
- // Reply with a body and a file attachment.
1432
-
1433
- Office.context.mailbox.item.displayReplyAllForm(
1434
-
1435
- {
1436
- 'htmlBody' : 'hi',
1437
- 'attachments' :
1438
- [
1439
- {
1440
- 'type' : Office.MailboxEnums.AttachmentType.File,
1441
- 'name' : 'squirrel.png',
1442
- 'url' : 'http://i.imgur.com/sRgTlGR.jpg'
1443
- }
1444
- ]
1445
- });
1446
-
1447
-
1448
- // Reply with a body and an item attachment.
1449
-
1450
- Office.context.mailbox.item.displayReplyAllForm(
1451
-
1452
- {
1453
- 'htmlBody' : 'hi',
1454
- 'attachments' :
1455
- [
1456
- {
1457
- 'type' : 'item',
1458
- 'name' : 'rand',
1459
- 'itemId' : Office.context.mailbox.item.itemId
1460
- }
1461
- ]
1462
- });
1463
-
1464
-
1465
- // Reply with a body, file attachment, item attachment, and a callback.
1466
-
1467
- Office.context.mailbox.item.displayReplyAllForm(
1468
-
1469
- {
1470
- 'htmlBody' : 'hi',
1471
- 'attachments' :
1472
- [
1473
- {
1474
- 'type' : Office.MailboxEnums.AttachmentType.File,
1475
- 'name' : 'squirrel.png',
1476
- 'url' : 'http://i.imgur.com/sRgTlGR.jpg'
1477
- },
1478
- {
1479
- 'type' : 'item',
1480
- 'name' : 'rand',
1481
- 'itemId' : Office.context.mailbox.item.itemId
1482
- }
1483
- ],
1484
- 'callback' : function(asyncResult)
1485
- {
1486
- console.log(asyncResult.value);
1487
- }
1488
- });
1489
-
1490
- ```
1491
-
1492
1371
```TypeScript
1493
1372
1494
1373
// Link to full sample:
@@ -2358,52 +2237,6 @@ methods:
2358
2237
#### Examples
2359
2238
2360
2239
2361
- ```TypeScript
2362
-
2363
- // Consider an add-in manifest has the following `Rule` element:
2364
-
2365
- //<Rule xsi:type="RuleCollection" Mode="And">
2366
-
2367
- // <Rule xsi:type="ItemIs" FormType="Read" ItemType="Message" />
2368
-
2369
- // <Rule xsi:type="RuleCollection" Mode="Or">
2370
-
2371
- // <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="fruits" RegExValue="apple|banana|coconut"
2372
- PropertyName="BodyAsPlaintext" IgnoreCase="true" />
2373
-
2374
- // <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="veggies"
2375
- RegExValue="tomato|onion|spinach|broccoli" PropertyName="BodyAsPlaintext" IgnoreCase="true" />
2376
-
2377
- // </Rule>
2378
-
2379
- //</Rule>
2380
-
2381
-
2382
- // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`.
2383
-
2384
- //{
2385
-
2386
- //'fruits': ['apple','banana','Banana','coconut'],
2387
-
2388
- //'veggies': ['tomato','onion','spinach','broccoli']
2389
-
2390
- //}
2391
-
2392
-
2393
- // The following example shows how to access the array of
2394
-
2395
- // matches for the regular expression rule elements `fruits`
2396
-
2397
- // and `veggies`, which are specified in the manifest.
2398
-
2399
- const allMatches = Office.context.mailbox.item.getRegExMatches();
2400
-
2401
- const fruits = allMatches.fruits;
2402
-
2403
- const veggies = allMatches.veggies;
2404
-
2405
- ```
2406
-
2407
2240
```TypeScript
2408
2241
2409
2242
// Link to full sample:
@@ -2477,44 +2310,6 @@ methods:
2477
2310
#### Examples
2478
2311
2479
2312
2480
- ```TypeScript
2481
-
2482
- // Consider an add-in manifest has the following `Rule` element:
2483
-
2484
- //<Rule xsi:type="RuleCollection" Mode="And">
2485
-
2486
- // <Rule xsi:type="ItemIs" FormType="Read" ItemType="Message" />
2487
-
2488
- // <Rule xsi:type="RuleCollection" Mode="Or">
2489
-
2490
- // <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="fruits" RegExValue="apple|banana|coconut"
2491
- PropertyName="BodyAsPlaintext" IgnoreCase="true" />
2492
-
2493
- // <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="veggies"
2494
- RegExValue="tomato|onion|spinach|broccoli" PropertyName="BodyAsPlaintext" IgnoreCase="true" />
2495
-
2496
- // </Rule>
2497
-
2498
- //</Rule>
2499
-
2500
-
2501
- // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`.
2502
-
2503
- //{
2504
-
2505
- //'fruits': ['apple','banana','Banana','coconut'],
2506
-
2507
- //'veggies': ['tomato','onion','spinach','broccoli']
2508
-
2509
- //}
2510
-
2511
-
2512
- const fruits = Office.context.mailbox.item.getRegExMatchesByName("fruits");
2513
-
2514
- const veggies = Office.context.mailbox.item.getRegExMatchesByName("veggies");
2515
-
2516
- ```
2517
-
2518
2313
```TypeScript
2519
2314
2520
2315
// Link to full sample:
@@ -2625,52 +2420,6 @@ methods:
2625
2420
#### Examples
2626
2421
2627
2422
2628
- ```TypeScript
2629
-
2630
- // Consider an add-in manifest has the following `Rule` element:
2631
-
2632
- //<Rule xsi:type="RuleCollection" Mode="And">
2633
-
2634
- // <Rule xsi:type="ItemIs" FormType="Read" ItemType="Message" />
2635
-
2636
- // <Rule xsi:type="RuleCollection" Mode="Or">
2637
-
2638
- // <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="fruits" RegExValue="apple|banana|coconut"
2639
- PropertyName="BodyAsPlaintext" IgnoreCase="true" />
2640
-
2641
- // <Rule xsi:type="ItemHasRegularExpressionMatch" RegExName="veggies"
2642
- RegExValue="tomato|onion|spinach|broccoli" PropertyName="BodyAsPlaintext" IgnoreCase="true" />
2643
-
2644
- // </Rule>
2645
-
2646
- //</Rule>
2647
-
2648
-
2649
- // The object returned from `getRegExMatches` would have two properties: `fruits` and `veggies`.
2650
-
2651
- //{
2652
-
2653
- //'fruits': ['apple','banana','Banana','coconut'],
2654
-
2655
- //'veggies': ['tomato','onion','spinach','broccoli']
2656
-
2657
- //}
2658
-
2659
-
2660
- // The following example shows how to access the array of matches for the
2661
-
2662
- // regular expression rule elements `fruits` and `veggies`, which are
2663
-
2664
- // specified in the manifest.
2665
-
2666
- const selectedMatches = Office.context.mailbox.item.getSelectedRegExMatches();
2667
-
2668
- const fruits = selectedMatches.fruits;
2669
-
2670
- const veggies = selectedMatches.veggies;
2671
-
2672
- ```
2673
-
2674
2423
```TypeScript
2675
2424
2676
2425
// Link to full sample:
0 commit comments