ªð¦^¦Cªí ¤W¤@¥DÃD µo©«

Excel VBA Outlook body °ÝÃD

Excel VBA Outlook body °ÝÃD

¤p§Ìªì¾ÇVBA, ¦³ÂIÃøÃD§Æ±æ¦U¦ì¤j¤jÀ°¦£¸Ñ¨M!! ¸U¤À·PÁÂ.

¦pªG§Ú«YEXCEL ¤J­±, ¦³¤@­Ó½d³ò·Qpaste ¸¨­Ómail boay ¨ì, ¥i¥HÂI°µ©O?
¦Ó®a§Ú¥u¥i¥HCOPY ¥ª­Ó½d³ò, ¤§«á«Y­Ómail ¨ìpasteªð¸¨¥h, ¦ý«Y§Ú·Q¤@¥X­Ómail­Óbody ´N¦³®ID¦r,
¤WºôÚ»¹L, ¦³¤HÁ¿¥i¥Hgroup ¤@®æ¥ý¥X, ¦ý«Y§Ú­Ó½d³ò¤Ó¤j, °µ­ø¨ì, ¥i¥HÂIºâ©O???

¦^´_ 1# yowhome


   §A¥u­n±H¥X¤å¥»¤º®e?
  1. Sub ex()
  2. Set xlOut = CreateObject("Outlook.Application")
  3. '±N±H¥X½d³ò©R¦W¬°Rng¡A¨ú±oRng©Ò¦³¤å¦r
  4. For i = 1 To [Rng].Rows.Count
  5.    For j = 1 To [Rng].Columns.Count
  6.       s = IIf(s = "", [Rng].Cells(i, j), s & Chr(9) & [Rng].Cells(i, j))
  7.    Next
  8.    mystr = IIf(mystr = "", s, mystr & Chr(10) & s)
  9.    s = ""
  10. Next

  11. With xlOut
  12.   Set Mymail = .CreateItem(olMailItem)
  13.   With Mymail
  14.   .Subject = "Mail send test" '«H¥ó¥D¦®
  15.   .Recipients.Add "¦¬¥óªÌ@hotmail.com" '¦¬¥óªÌmailaddress
  16.   .Body = mystr '¥HRng¤º®e¬°¤º¤å
  17.   .Send '±H¥X«H¥ó
  18.   End With
  19. End With
  20. End Sub
½Æ»s¥N½X
¾Ç®üµL²P_¤£®¢¤U°Ý

TOP

Hsieh , §Ú¦¨¥\¤F, ÁÂÁÂ.
¦pªG§Ú·Q­nªº¬O·ípaste to mail body ªº®É«J,
«O¯dEXCEL FORMAT,¤SÀ³¦p¦ó©O??

TOP

¦^´_ 2# Hsieh


    Hsieh , §Ú¦¨¥\¤F, ÁÂÁÂ.
¦pªG§Ú·Q­nªº¬O·ípaste to mail body ªº®É«J,
«O¯dEXCEL FORMAT,¤SÀ³¦p¦ó©O??

TOP

        ÀR«ä¦Û¦b : «Ý¤H°h¤@¨B¡A·R¤H¼e¤@¤o¡A´N·|¬¡±o«Ü§Ö¼Ö¡C
ªð¦^¦Cªí ¤W¤@¥DÃD