title: How to call a Function in a string in VBA
body: <p>I have a MS Access database in which I want to call a function which has today's date in a string as below. I am trying to put today's date in the subject line and the email body on the new email which will be created. Any ideas to achieve this?</p>
  
  <pre><code>Private Sub Command_Click()
  
  Dim objOutlook As Outlook.Application
  Dim objEmail As Outlook.MailItem
  Dim ThisDay As Date
  
  ThisDay = Format(Now, "mm/dd/yy")    
  
  Set objOutlook = CreateObject("Outlook.application")
  Set objEmail = objOutlook.CreateItem(olMailItem)
  
  With objEmail
      .To = ""
      .CC = ""
      .Subject = "Daily Email Processed " *(Thisday)
      .Body = "Hi," + vbNewLine + vbNewLine + vbNewLine + "Please find below the number of Emails processed for the  " + vbNewLine + vbNewLine + "Email Count = " + vbNewLine + "O Count = "
      .Attachments.Add ""
      .Attachments.Add ""
      .Display        
  End With
  
  Set objOutlook = Nothing
  
  End Sub
  </code></pre>