Browsing and selecting multiple files - InfoPath Dev
in

InfoPath Dev

Browsing and selecting multiple files

Last post 08-01-2012 05:12 AM by socknose. 0 replies.
Page 1 of 1 (1 items)
Sort Posts: Previous Next
  • 08-01-2012 05:12 AM

    Browsing and selecting multiple files

    Hello there. I'm currently in the process of designing a form that will allow people to request changes to our pretty locked down NTFS area. In order to do this, I need the user to be able to browse and select multiple files from a directory and their choices to appear in a richtext box that can then be submitted. So far this is what I have:

    Sub CTRL56_5_OnClick(eventObj)
    Set objDialog = CreateObject("UserAccounts.CommonDialog")
     objDialog.Filter = "VBScript Scripts|*.vbs|All Files|*.*"
     objDialog.Flags = &H0200
     objDialog.FilterIndex = 1
     intResult = objDialog.ShowOpen
     If intResult = 0 Then
      Wscript.Quit
     Else
      arrFiles = Split(objDialog.FileName, " ")
        For i = 1 to Ubound(arrFiles)
            strFile = arrFiles(0) & arrFiles(i)
            Wscript.Echo strFile
        Next
    End If

    End Sub

    This isn't my code, I took it from elsewhere. It doesn't work, Infopath throws up an error about the Syntax of objDialog.Flags = &H0200. Am I completely barking up the wrong tree here? Does anyone know of a better way of doing it? Any help would be greatly appreciated.

    Cheers

Page 1 of 1 (1 items)
Copyright © 2003-2019 Qdabra Software. All rights reserved.
View our Terms of Use.