In the Word Web Add-in I can insert a content control by context.document.getSelection().insertContentControl() and get all of them by context.document.contentControls how can I do that in Outlook Web Add-in?
1 Answer
Content Controls are exclusive to Word. Outlook uses either HTML or plain text.
3 Comments
That's correct. In case you want to access or update the content of the message. There are some APIs referenced here: learn.microsoft.com/en-us/outlook/add-ins/…
Ahmed Salah
So can't I cast Outlook document to Word document like I can do in VSTO .net? example:
var inspector = Globals.ThisAddIn.Application.ActiveInspector(); var item = (MailItem)inspector.CurrentItem; var document = (Microsoft.Office.Interop.Word.Document)inspector.WordEditor; var range = document.Application.Selection.Range; var rng = (object)range; var contentControl = document.ContentControls.Add(WdContentControlType.wdContentControlRichText, ref rng);Marc LaFleur
No, that isn't possible.