How to open multiple files in visual basic for applications (ms outlook) <p>I use this code to open just one file when I click on a button. How can I select multiple files using a part of this code and open the folder at a specific directory?</p> <pre><code> Function BrowseForFile() Dim shell: Set shell = CreateObject("WScript.Shell") Dim fso: Set fso = CreateObject("Scripting.FileSystemObject") Dim tempFolder: Set tempFolder = fso.GetSpecialFolder(2) Dim tempName: tempName = fso.GetTempName() Dim tempFile: Set tempFile = tempFolder.CreateTextFile(tempName &amp; ".hta") tempFile.Write _ "&lt;html&gt;" &amp; _ " &lt;head&gt;" &amp; _ " &lt;title&gt;Browse&lt;/title&gt;" &amp; _ " &lt;/head&gt;" &amp; _ " &lt;body&gt;" &amp; _ " &lt;input type='file' id='f' &gt;" &amp; _ " &lt;script type='text/javascript'&gt;" &amp; _ " var f = document.getElementById('f');" &amp; _ " f.click();" &amp; _ " var shell = new ActiveXObject('WScript.Shell');" &amp; _ " shell.RegWrite('HKEY_CURRENT_USER\\Volatile Environment\\MsgResp" &amp; tempName &amp; _ "', f.value);" &amp; _ " window.close();" &amp; _ " &lt;/script&gt;" &amp; _ " &lt;/body&gt;" &amp; _ "&lt;/html&gt;" tempFile.Close shell.Run tempFolder &amp; "\" &amp; tempName &amp; ".hta", 0, True BrowseForFile = shell.RegRead("HKEY_CURRENT_USER\Volatile Environment\MsgResp" &amp; tempName) shell.RegDelete "HKEY_CURRENT_USER\Volatile Environment\MsgResp" &amp; tempName fso.DeleteFile (tempFolder &amp; "\" &amp; tempName &amp; ".hta") End Function Public Sub CommandButton1_Click() If ListBox1.ListIndex = -1 Then MsgBox "Message", vbExclamation, "Warning" End If With ListBox1 .AddItem BrowseForFile End With End Sub </code></pre> <p>Thanks in advance,</p>