This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
/// <summary> | |
/// EXTENSION METHOD | |
/// Get all the appointments between the given date times | |
/// </summary> | |
/// <param name="PobjItems"></param> | |
/// <param name="PobjStart"></param> | |
/// <param name="PobjEnd"></param> | |
/// <returns></returns> | |
public static List<Outlook.AppointmentItem> FindAppointments(this Outlook.Items PobjItems, | |
DateTime PobjStart, |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<VersionOverrides xmlns="http://schemas.microsoft.com/office/mailappversionoverrides" xsi:type="VersionOverridesV1_0"> | |
<!-- On Send requires VersionOverridesV1_1 --> | |
<!-- https://dev.office.com/docs/add-ins/outlook/outlook-on-send-addins --> | |
<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> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var sendEvent; | |
function onSendEvent(event) { | |
/// <summary> | |
/// OUTLOOK SEND EVENT | |
/// Entry point for Message onSend event | |
/// Per example: https://github.com/OfficeDev/Outlook-Add-in-On-Send/tree/master/outlook-add-in-on-send | |
/// Setup mailbox policy first: | |
/// 1) Get sessions and commands: https://technet.microsoft.com/en-us/library/jj984289(v=exchg.160).aspx | |
/// 2) Set policy and more info: https://dev.office.com/docs/add-ins/outlook/outlook-on-send-addins | |
/// </summary> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function asyncCompelte() { | |
// procress the result | |
if(isOkToSend() == true) { | |
sendEvent.completed({ allowEvent: true }); // send it | |
} else { | |
sendEvent.completed({ allowEvent: false }); // block it | |
} | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Office.context.ui.displayDialogAsync('https://localhost:3000/function-file/dialog.html', | |
{ height: 20, width: 30, displayInIframe: true }, | |
function (asyncResult) { | |
dialog = asyncResult.value; | |
// callbacks from the parent | |
dialog.addEventHandler(Office.EventType.DialogEventReceived, processMessage); | |
dialog.addEventHandler(Office.EventType.DialogMessageReceived, processMessage); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
function processMessage(arg) { | |
// close the dialog | |
dialog.close(); | |
// procress the result | |
if(arg.error == 12006) { | |
// user clicked the (X) on the dialog | |
sendEvent.completed({ allowEvent: false }); | |
} else { | |
if(arg.message=="Yes") { | |
// user clicked yes |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Form.Reset(); | |
Form.Show("/test.html",10,20,false,function(result){ | |
var yourJSON = JSON.parse(result).Result; | |
// if you placed false in the 4th param you must | |
// handle the close of the form | |
Form.DialogClose(); | |
}); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
InputBox.Reset(); | |
InputBox.Show("What value do you want to enter?", | |
"InputBox caption", | |
"Default value", function(result) { | |
var msg = ""; | |
if(result.length == 0) { | |
msg = "The user pressed cancel."; | |
} else { | |
msg = "The user entered: " + result; | |
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
MessageBox.Reset(); | |
MessageBox.Show("This is a test with a lot of text that simply has not point but to show you what " + | |
"happens when you place a lot of text in a MessageBox for any point other than to " + | |
"place a whole lot of text in the MessageBox.", | |
"This is the Caption", | |
MessageBoxButtons.AbortRetryCancel, | |
MessageBoxIcons.Stop, | |
true, "Check this if you want me to stop nagging you.", | |
function(buttonPressed, checked) { | |
console.log("The button pressed was: " + buttonPressed); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Office.initialize = function(reason) { | |
$(document).ready(function () { | |
$("#okButton").click(function() { | |
// notify the parent | |
Office.context.ui.messageParent("My custom message."); | |
}); | |
}); | |
}; |
OlderNewer