问题
Is it possible to get the parameters from the Outlook 365 add-in manifest programmatically (like version number or maybe resources)? I've searched all over the internet, but haven't found any way to do it yet :(
Some background: I need some information to be available at run-time from the manifest settings (the customers are expected to install the add-in via manifest and it is to be tailored for each customer with some special data).
Thanks in advance!
回答1:
The manifest file is only consumed by the client (i.e. Outlook or Word) for the purposes of rendering that add-in (i.e. the URL, buttons to display, minimum requirements, etc.). There are currently no APIs that expose manifest data to the add-in instance itself.
回答2:
One idea: what if you put the special data as something encoded in the start URL? That way you could read it back out via JavaScript, simply by looking at what parameter got passed in to you. Would that work?
来源:https://stackoverflow.com/questions/37755994/read-parameters-from-outlook-365-add-in-manifest