Demonstrates how to use the PrintPreview dialog in OfficeJS.dialogs, version 1.0.8
// this example takes the currently composed email message in Outlook, | |
// grabs its body HTML and then displays it in the Print Preview dialog. | |
var mailItem = Office.cast.item.toItemCompose(Office.context.mailbox.item); | |
mailItem.saveAsync(function(asyncResult) { | |
var id = asyncResult.id; | |
mailItem.body.getAsync(Office.CoercionType.Html, { asyncContext: { var3: 1, var4: 2 } }, function(result) { | |
var html = result.value; | |
PrintPreview.Show(html, function() { | |
Alert.Show("Print cancelled"); | |
}); | |
}); | |
}); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment