0

I have an Add-in for outlook, that fetches the data from the email and perform its functionality.

Next, I am looking to have an iframe containing a webpage.

enter image description here

Is there a way to make some kind of communication between the add-in and the webpage?

Use case:

Let's say, Using office APIs I'll fetch the subject of the email, then I want the subject to be copied to google search (input), and from my search button (external see arrow) I could trigger the action.

Eugene Astafiev
  • 34,483
  • 3
  • 16
  • 35
Gaurav Gupta
  • 631
  • 2
  • 16

1 Answers1

0

Of course, because you still deal with a regular HTML document. Use contents() to access the Document object inside an iframe. For example:

$('[name=your_iframe]').contents().find('button').click(function() {
    alert('click');
});

See Attach an event in a child iframe to a handler in the parent window for more information.

Eugene Astafiev
  • 34,483
  • 3
  • 16
  • 35