title: How to insert hyperlink into email body
body: <p>I created a macro in Excel to send emails to various users every time a specific file is updated.</p>
  
  <pre><code>Private Sub Workbook_BeforeSave(ByVal SaveAsUI As Boolean, Cancel As Boolean)
  
  Dim answer As String
  
  answer = MsgBox("Would you like to save the changes?", vbYesNo, "Save Document")
  
  If answer = vbNo Then Cancel = True
  
  If answer = vbYes Then
      'open outlook type stuff
      Set OutlookApp = CreateObject("Outlook.Application")
      Set OlObjects = OutlookApp.GetNamespace("MAPI")
      Set newmsg = OutlookApp.CreateItem(olMailItem)
      'add recipients
      'newmsg.Recipients.Add ("Name1")
      newmsg.Recipients.Add ("email@xxx.com")
      'newmsg.Recipients.Add ("Name2")
      newmsg.Recipients.Add ("email@xxx.com")
      'add subject
      newmsg.Subject = "Notification - Update file"
      'add body
      newmsg.Body = "This is an automated notification." &amp; vbNewLine &amp; vbNewLine &amp; _
        "The XXX file has been recently updated" &amp; vbNewLine &amp; vbNewLine &amp; _
        "Please do not reply to this email."
      newmsg.Display 'display
      newmsg.Send 'send message
      'give conformation of sent message
      MsgBox "Your document has successfully been saved", , "Confirmation"
  End If
  
  'save the document
  'Me.Worksheets.Save
  
  End Sub
  </code></pre>
  
  <p>I would like to add a hyperlink to the body text where it says "The <strong>XXX file</strong> has been recently updated" so that <strong>XXX file</strong> is a clickable link to a website.</p>