确定Office加载项的首次运行 [英] Determining First-Run of Office Add-In

查看:92
本文介绍了确定Office加载项的首次运行的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我目前正在尝试学习开发Office插件的最佳实践.我已经按照Microsoft的本教程进行了入门

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准则指出,您应该具有首次运行的经验,该经验说明了如何使用外接程序.我想知道什么是确定是否首次加载该插件的最佳方法,如果是的话,如何显示其他页面?是否可以在清单中设置不同的初始页面,还是我需要在第一次运行时使用Javascript进行重定向?

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?

推荐答案

很高兴听到有人关心用户体验,甚至还想编写出首次运行指南;)

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, ...?

否,清单没有任何内容指向Web应用程序的一次性使用"页面.

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

...还是在第一次运行时是否需要使用Javascript进行重定向?

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

是的,这正是您想要做的.如果用户第一次运行您的应用,则可以重定向到一些指南页面;如果您使用单页应用程序预览用户指南,则可能还会显示和隐藏<div>图层.我什至看到一个花哨"的应用程序,它在您的应用程序控件的顶部显示了透明层,并带有解释,看起来很酷,是第一次使用时的上下文手册.

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...?

从我的角度来看,最好的方法是使用 RoamingSettings 对象可以设置某种标记,如果用户浏览了指南并不想再看到它.该对象将在Office.initialize之后立即可用,因此您可以尝试获取此标记(键)并根据需要重定向到您的应用程序页面或指南页面.

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.

这篇关于确定Office加载项的首次运行的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆