title: How to add images, documents in Clipboard in VB?
body: <p>Previously I was using this code to add only Images to the application (GIFs doesn't work): </p>
  
  <pre><code> Private Sub Button1_Click(sender As Object, e As EventArgs) Handles BtnImgBrowse.Click
          Dim t As New OpenFileDialog
          t.Filter = "*.JPG;*.PNG;*.GIF|*.JPG;*.PNG;*.GIF"
          If t.ShowDialog = DialogResult.OK Then
              TxtImgFile.Text = t.FileName
              Clipboard.SetImage(Image.FromFile(TxtImgFile.Text))
          End If
      End Sub
  </code></pre>
  
  <p>Now I want to add PDfs, Documents and Excel file also, So I changed my code little bit, but it doesn't seem to work:</p>
  
  <pre><code>Private Sub Button1_Click(sender As Object, e As EventArgs) Handles BtnImgBrowse.Click
      Dim t As New OpenFileDialog
      t.Filter = "*.JPG;*.PNG;*.GIF;*.DOC;*.DOCX;*.XLS;*.XLSX;*.PDF|*.JPG;*.PNG;*.GIF;*.DOC;*.DOCX;*.XLS;*.XLSX;*.PDF"
      If t.ShowDialog = DialogResult.OK Then
          TxtImgFile.Text = t.FileName
          Clipboard.ContainsData(TxtImgFile.Text)
      End If
  End Sub
  </code></pre>
  
  <p>It just copies the Data from my system. Not the file that I select within the application.</p>