title: VBA CDO Sending old image in email body
body: <p>I'm using vba to send email using CDO (See below) it keeps pulling a old image from over 30 days ago for the email that it is sending out.  Can anyone help?</p>
  
  <pre><code>Public Function sndmail(ByVal RecipientList As String, _
      ByVal Subject As String, ByVal body As String, Optional ByVal Attachment As String, _
      Optional ByVal cc As String)
  Dim iMsg As Message
  Dim iConf As Configuration
  Dim strbody As String
  Dim Flds As Variant
  
  Set iMsg = CreateObject("CDO.Message")
  Set iConf = CreateObject("CDO.Configuration")
  
  iConf.Load -1    ' CDO Source Defaults
  Set Flds = iConf.Fields
  With Flds
    .Item("http://schemas.microsoft.com/cdo/configuration/sendusing") = 2
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserver") = "SMTP.xx.xyz.COM"
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpserverport") = 25
    .Item("http://schemas.microsoft.com/cdo/configuration/smtpusessl") = False
    .Update
  End With
  
  With iMsg
      Set .Configuration = iConf
      .To = RecipientList
      .cc = cc
      .From = "chris@yoohoo.com"
      .Subject = Subject
      .HTMLBody = body
  End With
  
  iMsg.Send
  
  End Function
  
  ...
  
  imgfile = "C:\TEMP\FDW_Img.png"
  imgfile2 = "C:\TEMP\FDW_DoD.png"
  Set pp = New PowerPoint.Application
  Set ppt = pp.Presentations.Open("C:\TEMP\bpp.pptx")
  wbk1.Sheets("Summary by Modcode").Range("F22:Z28").Copy
  ppt.Slides(1).Shapes.PasteSpecial (ppPasteBitmap)
  ppt.Slides(1).Shapes(1).Export imgfile, ppShapeFormatPNG
  ppt.Close
  pp.Quit
  DoEvents
  
  'list of recipients
  sndto = ""
  'subject line for email
  subj = "5 State Capital Finance Reports for  " &amp; Date
  'body of email
  bod = "Happy " &amp; WeekdayName(Weekday(Date)) &amp; "! &lt;br&gt;" &amp; WeekdayName(Weekday(Date)) &amp; "'s reports have been updated and can be found at the below links and snapshots can be found at the first weblink:&lt;br&gt;&lt;br&gt;" &amp; _
   "&lt;a href = a weblink here that currently works fine&gt; Finance Website &lt;/a&gt; &lt;br&gt;" &amp; _
      "&lt;a href = another one here... works fine&gt; Open vs Actuals &lt;/a&gt; &lt;br&gt;" &amp; _
      "&lt;a href = another one here... works fine&gt; EE Report &lt;a&gt;&lt;br&gt;" &amp; _
      "&lt;a href = another one here... works fine&gt; FDW Actuals &lt;a&gt;" &amp; _
      " &lt;br&gt; &lt;br&gt;&lt;img src='C:\Temp\FDW_img.png'&gt;&lt;br&gt;&lt;br&gt;" &amp; sig
  'function to send email
  sndmail sndto, subj, bod
  Application.CutCopyMode = False
  wbk1.Close False
  </code></pre>
  
  <p>This line is where it adds the image to the body of the email and it is adding an old image... the strange thing is that on the host pc if I pull up my email it shows correctly but on all other recipients or if I pull up my email on another pc it shows up with the old image.</p>
  
  <pre><code>" &lt;br&gt; &lt;br&gt;&lt;img src='C:\Temp\FDW_img.png'&gt;&lt;br&gt;&lt;br&gt;" &amp; sig
  </code></pre>