Advertisement
Guest User

Untitled

a guest
Jun 24th, 2019
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. For i = 1 To 2
  2.  
  3. ThisWorkbook.Sheets("Resumen").Range("F5").Value = i
  4. ActiveWorkbook.EnvelopeVisible = True
  5.  
  6. With ActiveSheet.MailEnvelope
  7.  
  8. .Item.To = ThisWorkbook.Sheets("Resumen").Range("B6").Value
  9. .Item.Subject = ThisWorkbook.Sheets("Resumen").Range("B5").Value
  10. .Attachment.Add ThisWorkbook.Sheets("Resumen").Range("B7").Value 'THIS LINE SHOW THE MISTAKE, "the object does not admit the method
  11. .Introduction = "RESUME"
  12. .Item.Send
  13.  
  14. End With
  15.  
  16. ActiveWorkbook.EnvelopeVisible = False
  17. Next i
  18.  
  19. End Sub
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement