Skip to content
This repository has been archived by the owner on Nov 20, 2022. It is now read-only.

Outlook - Launch HTML form in custom task pane #2

Closed
ManojPatel1983 opened this issue Jan 20, 2018 · 4 comments
Closed

Outlook - Launch HTML form in custom task pane #2

ManojPatel1983 opened this issue Jan 20, 2018 · 4 comments

Comments

@ManojPatel1983
Copy link

Hello,

I have outlook plugin (outlook 2010) where I want to launch HTML form in the custom task pane and for that thought to use chromium browser.
But looks like CefSharp doesn't provide multiple AppDomains so probably it will not work based on this link
cefsharp/CefSharp#351

However, I saw "AppHostCefSharp" approach and the sample project uploaded for ExcelDNA which looks promising but in #351 it's mentioned about "Trouble with RedGate.AppHost is the one-way communication" My requirement is to implement 2 way communication so Outlook and HTML form can share the data required.
Also, the HTML form will be displayed on the Custom Task Pane (CTP) so with email window both outlook and form should get displayed.

With this approach do you see any issue with my requirement of 2 way communication and display form in the same screen ?

Thanks!

@stever
Copy link
Owner

stever commented Jan 20, 2018

Hello

I've no idea how you would do this in Outlook. I've used Excel-DNA, which is for Excel only, and it helps a lot with the process integration. A named-pipe was added to the example in this repository which helps, but it's still one-way really. I'd been using an embedded HTTP server before then. It's still complicated with both parts being in separate processes.

@ManojPatel1983
Copy link
Author

Hi, Thanks for your response.
Can you please confirm whether this AppHostCefSharp approach would resolve issue
cefsharp/CefSharp#1191 "CefSharp with Outlook 2010 VSTO Add-in #1191 ".

If yes then probably I should be able to use that. With CefSharp I could launch HTML form in winform and implement 2 way communication. So I want similar thing with Outlook but I saw CefSharp issue with Outlook 2010 VSTO Add-in so looking for an alternate option which can fix this issue and can support 2 way communication.

Thanks.

@stever
Copy link
Owner

stever commented Jan 21, 2018

You certainly won't enjoy the same 2-way communication that you can get with CefSharp without the AppDomain issue. There may be workarounds, such as using a Web Socket server.

I am not sure if the named pipe solution can be used for duplex communications. It seems there might be potential for that according to this link but can't say that will work with RedGate AppHost. Could be worth a go.

Web Socket is probably fairly easy, but then in all these cases there is a potential problem with administrator requirement on reserving ports or named pipes, and security considerations. Fleck seems pretty good for Web Socket implementation in C#. Restrict to local connections only is a good start.

@ManojPatel1983
Copy link
Author

Thanks. looks like it would be difficult to implement this with outlook - launch form and 2 way communication.

I tried the approach suggested by flole (#1556) about to get the default appDomain and initialize ChromiumWebBrowser (this is using CefSharp). That way I can instantiate the Chromium control but not able to add it to my Winform as again it's from a different AppDomain so throws error "Remoting cannot find field 'parent' on type 'System.Windows.Forms.Control'.".

cefsharp/CefSharp#1556

@stever stever closed this as completed Mar 2, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants