title: How to implement Application.FileDialog using Outlook VBA?
body: <p>I want to attach a file to my mail. I want to choose the path.</p>
  <p>I tried <code>Application.FileDialog</code>.</p>
  <p>I get</p>
  <blockquote>
  <p>Runtime Error 438.</p>
  </blockquote>
  <p>I found this code on the Internet:</p>
  <pre class="lang-vb prettyprint-override"><code>Sub Main()
      Dim fd As FileDialog
      Set fd = Application.FileDialog(msoFileDialogFilePicker)
   
      Dim vrtSelectedItem As Variant
   
      With fd
   
          If .Show = -1 Then
              For Each vrtSelectedItem In .SelectedItems
  
              Next vrtSelectedItem
  
          Else
  
          End If
  
      End With
   
      Set fd = Nothing
  End Sub
  </code></pre>