Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Welcome To Ask or Share your Answers For Others

Categories

0 votes
324 views
in Technique[技术] by (71.8m points)

Office Add-In with configurable options during installation?

Currently I am looking for examples how to write an Office Add-In providing an UI with configurable options for the Add-In alone during installation. And sets them as roaming settings upon once consent is give (submit button).

There is this well-known API for Roaming Settings: https://dev.office.com/reference/add-ins/outlook/RoamingSettings. Plus an API for dialogues, see https://github.com/OfficeDev/office-js-docs-pr/blob/master/docs/develop/dialog-api-in-office-add-ins.md.

With these you can show an UI for configuring options. But my missing piece is how to display this during installation?

In other words: how can we ask the user for some parameters before finalising installation?

Any clues very welcome. Thanks!

See Question&Answers more detail:os

与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
Welcome To Ask or Share your Answers For Others

1 Reply

0 votes
by (71.8m points)

There is not currently any way to handle the installation event. That's an interesting idea and you should request it at Office Developer User Voice.

In the meantime, consider implementing "first run" logic that prompts the user for her preferences. See this Stack question: Is there any best practice how to detect a first run of the app?

Also, RoamingSettings is available only for Outlook.


与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…
OGeek|极客中国-欢迎来到极客的世界,一个免费开放的程序员编程交流平台!开放,进步,分享!让技术改变生活,让极客改变未来! Welcome to OGeek Q&A Community for programmer and developer-Open, Learning and Share
Click Here to Ask a Question

...