Warning: file_get_contents(/data/phpspider/zhask/data//catemap/5/ember.js/4.json): failed to open stream: No such file or directory in /data/phpspider/zhask/libs/function.php on line 167

Warning: Invalid argument supplied for foreach() in /data/phpspider/zhask/libs/tag.function.php on line 1116

Notice: Undefined index: in /data/phpspider/zhask/libs/function.php on line 180

Warning: array_chunk() expects parameter 1 to be array, null given in /data/phpspider/zhask/libs/function.php on line 181
Vb.net vbscript从Outlook 2010打开本地服务器上的文件文件夹_Vb.net_Networking_Vbscript_Outlook - Fatal编程技术网

Vb.net vbscript从Outlook 2010打开本地服务器上的文件文件夹

Vb.net vbscript从Outlook 2010打开本地服务器上的文件文件夹,vb.net,networking,vbscript,outlook,Vb.net,Networking,Vbscript,Outlook,因此,我需要在outlook 2010中为使用自定义表单的用户创建一个简短的子文件夹,以在网络上打开特定文件夹,进一步浏览图片(网络上的每个人都有权限)。然而,我有点困惑,因为这应该是一个简单的脚本来运行,但是从Outlook窗体的子运行中,我得到了一个shell错误,或者wscript错误。目前我得到的错误是“对象不支持此属性或方法:'objShell.Shell' 这是我到目前为止的代码,我尝试过的每个wscript或函数似乎都会出现类似的错误: Dim objShell Dim Short

因此,我需要在outlook 2010中为使用自定义表单的用户创建一个简短的子文件夹,以在网络上打开特定文件夹,进一步浏览图片(网络上的每个人都有权限)。然而,我有点困惑,因为这应该是一个简单的脚本来运行,但是从Outlook窗体的子运行中,我得到了一个shell错误,或者wscript错误。目前我得到的错误是“对象不支持此属性或方法:'objShell.Shell'

这是我到目前为止的代码,我尝试过的每个wscript或函数似乎都会出现类似的错误:

Dim objShell
Dim ShortName
Dim AddressOnly

set objShell = CreateObject("shell.application")
If ClientCode = "1" Then
    objShell.Shell.Open("Server:\path\"& ShortName &" - "& AddressOnly &"\")
        ElseIf ClientCode = "2" Then
        objShell.Shell.Open("Server:\path\"& ShortName &" - "& AddressOnly &"\")
            ElseIf ClientCode = "3" Then
            objShell.Shell.Open("Server:\path\"& ShortName &" - "& AddressOnly &"\")
End if

    set objShell = nothing

下面是我发现的用于此选项的代码,用于打开文件夹并通过explorer.exe显示完整内容:

If ClientCode = "1" Then
    folder = "Server:\path\"& ShortName &" - "& AddressOnly & "\"                                       
    ElseIf ClientCode = "2" Then
    folder = "Server:\path\"& ShortName &" - "& AddressOnly & "\"                                   
        ElseIf ClientCode = "3" Then
        folder = "Server:\path\"& ShortName &" - "& AddressOnly & "\"                               
End if

Set fso = CreateObject("Scripting.FileSystemObject")
    If Not fso.FolderExists(folder) Then
        MsgBox "No Files Exist. You must create the file first before trying to find it.", vbExclamation, "No File Found."
        Exit Sub
    Else
        'moving on
    End If

set WSshell = createobject("wscript.shell")
WSshell.run "C:\WINDOWS\explorer.exe "& folder &"", 1
Set WSshell = nothing

您需要详细解释您正在尝试执行的操作。您是否尝试显示windows文件打开对话框,以便他们可以浏览文件并选择单个文件或多个文件?我只想在资源管理器窗口中为用户打开文件夹,以便可以进一步手动操作其中的照片。