title: Putting date after after file name
body: <p>This is what I have so far:</p>
  
  <pre><code>Public Sub saveAttachtoDisk6(itm As Outlook.MailItem)
  Dim objAtt As Outlook.Attachment
  Dim saveFolder As String
  saveFolder = "P:\me\"
  Dim dateFormat
  dateFormat = Format(Now, "yyyy.mm.dd")
   For Each objAtt In itm.Attachments
          If InStr(1, objAtt.FileName, "ASDFA", vbTextCompare) &gt; 0 Then
          objAtt.SaveAsFile saveFolder &amp; dateFormat &amp; " ADFA ADF.pdf"
          ElseIf InStr(1, itm.Subject, "ASDF ADSF ADSF", vbTextCompare) &gt; 0 Then
          objAtt.SaveAsFile saveFolder &amp; dateFormat &amp; " ASD ASDF ASD.pdf"
          ElseIf InStr(1, objAtt.FileName, "ASDDAAD", vbTextCompare) &gt; 0 Then
          objAtt.SaveAsFile saveFolder &amp; dateFormat &amp; " ASDF ADF AD.pdf"
          Else
    End If
    Set objAtt = Nothing
   Next
  End Sub
  </code></pre>
  
  <p>Changed file names for privacy, but I want to put the date after the file name but I need the .pdf to save the files as pdf's. The files I get are pdf's in the email but for some reason I could only get this to work by appending .pdf at the end of the file name. Is there any way to get this to save as "ASDD ASDAS 2016.05.11.pdf" instead of "2016.05.11 ADSF ASDF.pdf"? </p>
  
  <p>Thanks!!!</p>