title: How to get the email address of the current logged-in user?
body: <p>I'm new to VBA and trying to get an automated word document working. At the moment there is a Button in the document that which upon pressing, will fire off an email with the document attached. </p>
  
  <p>However I need to also get the email address of the current user sending the email, so I can place it inside the document before sending it off. My searches on the internet have not resulted in any usable code that meets my situation. My current code is below.</p>
  
  <pre><code>Set OL = CreateObject("Outlook.Application")
  Set EmailItem = OL.CreateItem(olMailItem)
  
  Set Doc = ActiveDocument
  Doc.Save
  
  With EmailItem
      .Subject = "Requesting Authorization Use Overtime"
      .Body = "Please review the following request for overtime" &amp; vbCrLf &amp; _
      "" &amp; vbCrLf &amp; _
      "Thanks"
      .To = "toemail@test.com"
      .Importance = olImportanceNormal
      .Attachments.Add Doc.FullName
      .Send
  End With
  </code></pre>
  
  <p>Not sure if this is relevant, but when the document is being used, the Outlook application will always be open with a user signed in. Im used to having intellisense help in these sorts of situations so I can fool around with methods and properties, but there seems to be very little help from intellisense.</p>