Comments (6)
Hi @CorithMalin82,
Unfortunately, I don't think this scenario will work. When Outlook on Windows launches your code to handle an event it uses a plain JavaScript engine. There's no UI or browser runtime, which likely Blazor WebAssembly would expect.
It's possible it might work in Outlook on the browser. In that case Outlook will use the browser to run your event code. Have you tried that scenario?
@aafvstam do you have any ideas here?
Thanks!
David
from office-add-in-samples.
Hi @davidchesnut,
We were testing in the browser and on Windows Desktop with Outlook 365. Both would work with a TaskPane but neither would work when trying to use the OnMessageSend
feature. I suspect you're right on about the UI or browser runtime, as the issue we've encountered is an inability to get the blazor app to load because it seems it's never being hit.
Do you know if Blazor apps for the OnMessageSend
feature are in the works? It would enable my company to drastically speed up the processing of our web add-in as right now we end up having to do the processing remotely using the GraphAPI instead of locally via JavaScript. It would also save us compute resources as we could do our processing on the client's computer instead of in our clouse services.
Thanks for your thoughts and comments.
from office-add-in-samples.
Hi @CorithMalin82, thanks for sharing your scenario. I found this documentation on Blazor webassembly which I think confirms it is dependent on a DOM (from diagram and descriptions). I know the JS Runtime used for Outlook events doesn't have a DOM. I do have a question out to the Blazor team to see if there is any workaround, and will post an update if I find anything. Unfortunately for now, I don't think it's possible.
from office-add-in-samples.
@davidchesnut - Just wanted to check in with you to see if the Blazor team ever got back to your question. No worries if they didn't as I appreciate that you reached out to them. :)
from office-add-in-samples.
Hi @CorithMalin82, yes I checked into this more and discovered that the JavaScript engine that runs your event code doesn't support loading JS libraries. There's no way to provide an HTML Script tag to point to any libraries. So right now there isn't a way to load Blazor with event code in Outlook.
If you want to request this feature, please go to our feature request site for Microsoft 365. You can create a request with more details there. One thing we are curious about, since there is no UI in events, is are you just wanting Blazor to run c# code, or is there more to your scenario? We'd like to know more.
Thanks!
David
from office-add-in-samples.
Hi @davidchesnut - I'll put more info in the feature request form and thank you for all this research and re-assurance that what we were trying to do is actually impossible at this time. :)
We mainly do want Blazor to run C# code for the send events. The main reason for this is that we have a well developed library for data extraction and analysis and it is written in .Net as, at the time, we wanted to be able to run it everywhere. What we've found is that having our web add-in call a service in the cloud which then contacts graph, which then uses our extraction library, and then returns the results back to the web add-in... it's just too slow (especially for messages with attachments). On top of that, many clients prefer extraction is done locally and our system only receives the metadata about what was extracted.
from office-add-in-samples.
Related Issues (20)
- Javascript exception on initial attempt at running Office-Add-in-ASPNET-SSO sample HOT 10
- Error: You must provide the URL of lib/mappings.wasm by calling SourceMapConsumer.initialize HOT 1
- Need admin privs to npx install, no? HOT 2
- Outlook event-based activation examples are immature HOT 3
- Converting Outlook VSTO add-in to web add-in HOT 5
- Example works only in OWA HOT 5
- Office-Add-in-NodeJS-SSO Example fails to claim scope HOT 1
- Sample: Outlook-Add-in-SSO-NAA HOT 9
- How to debug against outlook online account with MFA? HOT 4
- Not able to display Html HOT 5
- Error when using non-localhost as redirect URI. HOT 8
- How to create Word Add-in SplitButton Control? HOT 1
- Office.AutoShowTaskpaneWithDocument with shared runtime? HOT 5
- Outlook-Add-in-SSO-NAA: Questions on usage on mobile devices
- Can we implement NAA-SSO for spam-addins?
- Hello World add-in doesn't work in desktop Outlook 2016 HOT 4
- In SSO fallback, getAccessTokenMSAL() returns a different result than Office.auth.getAccessToken()
- In SSO Fallback, getAccessTokenMSAL() returns a different user than Office.auth.getAccessToken() HOT 6
- The Spam Reporting example uses Office.onReady, which will not work on Classic Outlook HOT 1
- Edit the Existing mail HOT 5
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from office-add-in-samples.