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

[µo°Ý] 1¬¡­¶Ã¯¤º¥HSHEET¦WºÙ°t¹ï¹q¶l¦a§}

[µo°Ý] 1¬¡­¶Ã¯¤º¥HSHEET¦WºÙ°t¹ï¹q¶l¦a§}

¤j¤j, ¤U¦C¬O¤@­Ó¥i¥Hµo°e¹q¶lªþ¥óªºµ{¦¡, ·Q¥[¤J¤@­ÓWORKSHEETS("EMAIL"), ¤ºAÄæ¬OSHEET NAME, BÄæ¬O¹q¶l¦a§}, ¦pªGSHEET NAME = AÄ椺SHEET NAME, «h¤U¦CTO ªºEMAIL ADDRESS¨úBÄæ, ¦ý¦³¦h±iSHEETS :,
  1. Sub saveoneshop_email_3()

  2. Dim xPath As String
  3. Dim F As String
  4. Dim Sheetname As String
  5. Dim savesheet As Object

  6. Application.ScreenUpdating = False
  7. Application.DisplayAlerts = False
  8. xPath = Application.ActiveWorkbook.Path

  9. F = InputBox
  10.     If F = "" Then Exit Sub
  11. Sheetname = InputBox
  12. If Sheetname = "" Then Exit Sub
  13.     Set savesheet = ActiveWorkbook.Worksheets(Sheetname)
  14.     savesheet.Copy
  15.     Set savesheet = ActiveWorkbook
  16.     savesheet.SaveAs Filename:=xPath & "\" & Sheetname & "_" & F & ".xlsx"

  17.     Dim Mail_Object, Mail_Single As Variant
  18.     Dim contact As String
  19.     contact = "[email protected]"
  20.     Email_Subject = Sheetname & "_" & F & "ªí"
  21.     Email_Cc = ""
  22.     Email_Bcc = ""
  23.     Email_Body = "XX"

  24.         Set Mail_Object = CreateObject("Outlook.Application")
  25.         Set Mail_Single = Mail_Object.CreateItem(o)

  26. With Mail_Single
  27.      .Subject = Email_Subject
  28.     .To = Email_Send_To
  29.     .CC = Email_Cc
  30.     .BCC = Email_Bcc
  31.     .Body = Email_Body
  32.     .Attachments.Add (xPath & "\" & Sheetname & "_" & F & ".xlsx")
  33.     .Display
  34.     '.send

  35. End With
  36. savesheet.Close

  37. Application.DisplayAlerts = True
  38. Application.ScreenUpdating = True
  39. End Sub
½Æ»s¥N½X

¦³¤j¤j¥i¥H½ç±Ð¶Ü?:D

TOP

        ÀR«ä¦Û¦b : ¦n¨Æ­n´£±o°_¡A¬O«D­n©ñ±o¤U¡A¦¨´N§O¤H§Y¬O¦¨´N¦Û¤v¡C
ªð¦^¦Cªí ¤W¤@¥DÃD