问题描述
我正在Outlook中开发一个VBA应用程序。由于某些原因,我不能再输入:
I am developing a VBA application in Outlook. For some reason I can not longer type:
将F F D F文件夹
Dim F as Folder
输入VBA代码。无论出于何种原因,自动修正都会将其更改为
into the VBA code. For whatever reason the auto correction keeps changing it to
Dim F as folder
Dim F as folder
这不是什么大不了但我似乎阻止了我声明文件夹类型。使用变量的第一条指令是:
This is not a big deal but I seems to prevent me from declaring the Folder type. The first instruction using the variable is:
设置f = fso.GetFolder(路径)
Set f = fso.GetFolder(path)
这会产生类型不匹配错误。
This produces a type mismatch error.
进入即时窗口并输入
? typename(f)
? typename(f)
产生
"没什么"
我搜索过我的项目是否有不寻常的文件夹用途,但无法找到解释。
I have searched my project for unusual uses of Folder and cannot find an explanation.
有谁能告诉我我能做些什么才能知道发生了什么?
Can anyone tell me what I can do to find out what is going on?
推荐答案
我认为您使用的是还有一个文件夹定义的outlook类。
I think you are using a class of outlook which has also a defintion of folder.
请确保你的"微软脚本运行时"
make sure in your refenerences you have "microsoft scripting runtime"
而不是dim f作为文件夹而不是尝试dim f作为 Scripting.Folder
instead of dim f as folder than try dim f as Scripting.Folder
希望它有所帮助
这篇关于无法将变量调暗到某种类型(文件夹)的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!