title: VBA: save to PDF and send it with a specific title to pre-selected email addresses
body: <p>I have the following code that saves to the current folder and opens the file:</p>
  
  <pre><code>Dim myFile As Variant
  Dim strFile As String
  On Error GoTo errHandler
  
  Set ws = Worksheets("mysheet")
  
  'enter name and select folder for file
  ' start in current workbook folder
  strFile = Replace(Replace(ws.Name, " ", ""), ".", "_") _
              &amp; "_" _
              &amp; Format(Now(), "yyyymmdd\_hhmm") _
              &amp; ".pdf"
  strFile = ThisWorkbook.Path &amp; "\" &amp; strFile
  
  ws.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
      strFile, _
      Quality:=xlQualityStandard, IncludeDocProperties:=True, IgnorePrintAreas _
      :=False, From:=1, To:=3, OpenAfterPublish:=True
  
  exitHandler:
      Exit Sub
  errHandler:
      MsgBox "Could not create PDF file"
      Resume exitHandler
  End Sub
  </code></pre>
  
  <p>However, I do not want to open the file and want to send an email with the file as an attachment to some email addresses with a specified title on Outlook.</p>
  
  <p>How can I do this?</p>