Determining First-Run of Office Add-In

爱⌒轻易说出口 提交于 2020-01-24 20:06:10

问题


I am currently trying to learn the best practices for developing an Office Addin. I have followed this tutorial from Microsoft to get started.

Microsoft guidelines state that you should have a first run experience that explains how to use the add-in. I was wondering what the best method of determining whether or not the addin was loaded for the first time and if it was, how to show a different page? Can different initial pages be set within the manifest, or do I need to use Javascript to redirect on the first run in some manner?


回答1:


It's great to hear somebody care about user experience and even want to put together first run guide;)

Can different initial pages be set within the manifest, ...?

No, manifest do not have anything to point to "one time use" pages of your web application.

... or do I need to use Javascript to redirect on the first run in some manner?

Yes, this is exactly you would want to do. You may redirect to some guide page(s) if user runs your app first time; you may also show and hide <div> layers if you use single page application to preview user guide. I even saw one "fancy" app which displayed transporant layers on the top of the controls of your app with explanation, was looking very cool, kinda context manual for the first time use.

I was wondering what the best method of determining whether or not the addin was loaded for the first time and if it was...?

The best way, from my point of view, would be to use RoamingSettings object to set some kind of mark if user went through your guide and doesn't want to see it any longer. This object will be available right after Office.initialize, so you can try to get this mark (key) and redirect to your app page(s) or your guide page(s) according.



来源:https://stackoverflow.com/questions/44459540/determining-first-run-of-office-add-in

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!