title: Hyperlink stops at spaces in FilePath in VBA
body: <p>I want to give a Hyperlink to a sharedrive path in eMail generated through VBA. In my excel, mail distribution list, mail subject &amp; file path are dynamic hence VBA is picking these details from that particular cell. Since FilePath has 'space', hyperlink is not taking the entire path. Kindly see my code below and let me know where am I wrong-</p>
  <pre><code>Sub Draft_Mail()
  Dim OutApp As Object
  Dim OutMail As Object
  Dim Filepath As String
  Set OutApp = CreateObject(&quot;Outlook.Application&quot;)
  Set OutMail = OutApp.CreateItem(0)
  Filepath = Worksheets(&quot;Macro&quot;).Range(&quot;F7&quot;)
      
  With OutMail
  .To = Worksheets(&quot;Macro&quot;).Range(&quot;F9&quot;).Text
  .Cc = Worksheets(&quot;Macro&quot;).Range(&quot;F11&quot;).Text
  .Subject = Worksheets(&quot;Macro&quot;).Range(&quot;F13&quot;).Text
  .Attachments.Add Filepath
  .htmlBody = &quot;Hello-&quot; &amp; &quot;&lt;br/&gt;&quot; &amp; &quot;&lt;br/&gt;&quot; &amp; &quot;Please find attached Reconciliation for &quot; &amp; Worksheets(&quot;Macro&quot;).Range(&quot;F5&quot;).Text &amp; &quot;. Click on this link to open the file-  &quot; &amp; &quot;&lt;br/&gt;&quot; &amp; &quot;&lt;br/&gt;&quot; &amp; &quot;&lt;A href=&quot; &amp; Filepath &amp; &quot;&gt;&quot; &amp; Filepath &amp; &quot;&lt;/A&gt;&quot; &amp; &quot;&lt;br/&gt;&quot; &amp; &quot;&lt;br/&gt;&quot; &amp; &quot;Regards&quot;
  .Display
  
  End With
  End Sub
  </code></pre>