title: Autogenerate an email in an outlook and attach the currently open word document with VBS
body: <p>I want to write a VBS macro to auto generate an email in outlook and attach a word document. I currently have a macro that does this for excel, but I can't get it to work for Word. I can't figure out for the life of me what my "FName= " should be. Any suggestions or help would be greatly appreciated. Here is what I have:</p>
  
  <pre><code>Sub AutoEmail()
      On Error GoTo Cancel
  
      Dim Resp As Integer
      Resp = MsgBox(prompt:=vbCr &amp; "Yes = Review Email" &amp; vbCr &amp; "No = Immediately Send" &amp; vbCr &amp; "Cancel = Cancel" &amp; vbCr, _
      Title:="Review email before sending?", _
      Buttons:=3 + 32)
  
      Select Case Resp
  
          'Yes was clicked, user wants to review email first
          Case Is = 6
              Dim myOutlook As Object
              Dim myMailItem As Object
  
              Set otlApp = CreateObject("Outlook.Application")
              Set otlNewMail = otlApp.CreateItem(olMailItem)
              FName = ActiveWord &amp; "\" &amp; ActiveWord.Name
  
              With otlNewMail
              .To = ""
              .CC = ""
              .Subject = ""
              .Body = "Good Morning," &amp; vbCr &amp; vbCr &amp; "" &amp; Format(Date, "MM/DD") &amp; "."
              .Attachments.Add FName
              .Display
  
              End With
  
  
              Set otlNewMail = Nothing
              Set otlApp = Nothing
              Set otlAttach = Nothing
              Set otlMess = Nothing
              Set otlNSpace = Nothing
  
  
          'If no is clicked
          Case Is = 7
              Dim myOutlok As Object
              Dim myMailItm As Object
  
              Set otlApp = CreateObject("Outlook.Application")
              Set otlNewMail = otlApp.CreateItem(olMailItem)
              FName = ActiveWorkbook.Path &amp; "\" &amp; ActiveWorkbook.Name
  
              With otlNewMail
              .To = ""
              .CC = ""
              .Subject = ""
              .Body = "Good Morning," &amp; vbCr &amp; vbCr &amp; " " &amp; Format(Date, "MM/DD") &amp; "."
              .Attachments.Add FName
              .Send
              '.Display
              'Application.Wait (Now + TimeValue("0:00:01"))
              'Application.SendKeys "%s"
  
              End With
  
              'otlApp.Quit
  
              Set otlNewMail = Nothing
              Set otlApp = Nothing
              Set otlAttach = Nothing
              Set otlMess = Nothing
              Set otlNSpace = Nothing
  
  
          'If Cancel is clicked
          Case Is = 2
          Cancel:
              MsgBox prompt:="No Email has been sent.", _
              Title:="EMAIL CANCELLED", _
              Buttons:=64
  
      End Select
  
  End Sub
  </code></pre>