title: Saving a bitmap image on an Access form as a .bmp file using vba
body: <p>My end goal is to insert an image into a bookmark on word as part of a larger report. Using information on an access database submitted via a form.</p>
  
  <p>I can insert an image into a word bookmark using vba if the image is saved to a file on my computer.</p>
  
  <p>However i can't work out how to save a bitmap image in my access form to a file on my computer. </p>
  
  <p>Any help would be greatly appreciated.</p>
  
  <p>I've been trying to do it using SaveToFile but not having any success. </p>
  
  <p>Using the code below i keep getting the error 'Object Required'.</p>
  
  <pre><code>Private Sub SaveImages_Click()
  
  'Attempting to save bitmap image from database to file, then delete the 
  image from the database.
  Dim data As DAO.Recordset
  Set data = CurrentDb.OpenRecordset("Tbl1")
  vID = Me.Visit_ID
   While data.EOF = False
              'Check for match
              If data.Fields.Item(25).Value = vID Then
              'Get Value
              data.Fields(48).Value.SaveToFile ("C:temp")
              'Exit Loop
              data.MoveLast
              End If
              data.MoveNext
          Wend
  End Sub
  </code></pre>