title: Can't clear office clipboard with VBA
body: <p>I am using a function to copy a bunch of pictures out of an access database and store them on to the disk. However, this function uses the office clipboard and the clipboard fills up after about 150 records and crashes the program. Here is how I am clearing the clipboard</p>
  
  <pre><code>Private Declare Function apiOpenClipboard Lib "user32" Alias "OpenClipboard" (ByVal hwnd As Long) As Long
  Private Declare Function apiEmptyClipboard Lib "user32" Alias "EmptyClipboard" () As Long
  Private Declare Function apiCloseClipboard Lib "user32" Alias "CloseClipboard" () As Long
  
  Sub EmptyClipboard()
      Call apiOpenClipboard(0&amp;)
      Call apiEmptyClipboard
      Call apiCloseClipboard
  End Sub
  </code></pre>
  
  <p>Anyone know how to more effectively clear the clipboard</p>