VBA中缺少Office助手导致问题 [英] Lack of Office Assistant in VBA causing problems

查看:183
本文介绍了VBA中缺少Office助手导致问题的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我在powerpoint插件中有代码(用于早期版本的办公室),用于检查助手的状态:

I have code in a powerpoint addin (for earlier editions of office) that checks for the state of the assistant:

           如果(Assistant.AssistWithWizards)则为
                lprefState = msoWizardActActive

           否则

                lprefState = msoWizardActInactive

           结束如果

            If (Assistant.AssistWithWizards) Then
                lprefState = msoWizardActActive
            Else
                lprefState = msoWizardActInactive
            End If

使用Office 2010,即使助手对象似乎存在,也会弹出错误。

With Office 2010, this pops up an error even though the Assistant object seems to exist.

好的......所以微软删除了助手...但他们是否必须将所有引用都崩溃?

Ok ... so Microsoft removed the assistant ... but did they have to make all references to it crash out ?

有没有办法补偿这个?

推荐答案

您可以测试应用程序的版本:

You can test the version of the application:

            If Val(Application.Version) <= 11 Then
                If (Assistant.AssistWithWizards) Then
                    lprefState = msoWizardActActive
                Else
                    lprefState = msoWizardActInactive
                End If
            End If




Office助手在Office 2007(内部版本号= 12)及更高版本中不可用。


The Office assistant is unavailable in Office 2007 (internal version number = 12) and later.


这篇关于VBA中缺少Office助手导致问题的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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