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

[µo°Ý] ½Ð°Ý Range »P Ū¥X¿z¿ï¦C¼Æ ¡A¦p¦ó§ï¼g?

[µo°Ý] ½Ð°Ý Range »P Ū¥X¿z¿ï¦C¼Æ ¡A¦p¦ó§ï¼g?

¥»©«³Ì«á¥Ñ momo020608 ©ó 2019-5-12 21:04 ½s¿è

½Ð°Ý¦U¦ì¤j­ô­Ì
Sub Mail_workbook_Outlook_1()
'Working in Excel 2000-2016
'This example send the last saved version of the Activeworkbook
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm

  Sheets("°±µP¦C¦L").Visible = xlSheetVisible
     Sheets("°±µP¦C¦L").Select
   ActiveWindow.SelectedSheets.PrintPreview

   
        Dim rgExp As Range
        Set rgExp = Range("Âàµo!A1:C25")   
         
'³æ¯Âªº½d³ò¿ï¨úRange("Âàµo!A1:C25")¡A¦pªG¥[¤J¦Û°Ê¿z¿ï«á¡A¸Ó¦p¦ó§ï¼g ©O?         
´N¬O Âàµoªº¤u§@ï A¦C ¿z¿ï¡A¨ú®ø¿ï¨ú ªÅ¥Õ ¡AµM«á ¿ï¾Ü½d³ò¡AµM«áÂন ¹ÏÀÉ¡Aµo°e¹q¤l¶l¥ó!
    ActiveSheet.Range("$A$1:$C$25").AutoFilter Field:=3, Criteria1:="<>"

                 
        ''' Copy range as picture onto Clipboard
        rgExp.CopyPicture Appearance:=xlScreen, Format:=xlPrinter
        ''' Create an empty chart with exact size of range copied
        With ActiveSheet.ChartObjects.Add(Left:=rgExp.Left, Top:=rgExp.Top, _
        Width:=rgExp.Width, Height:=rgExp.Height)
        .Name = "myChart"
        .Activate
        End With
        ''' Paste into chart area, export to file, delete chart.
        ActiveChart.Paste
        ActiveSheet.ChartObjects("myChart").Chart.Export ThisWorkbook.Path & "\" & Range("A" & rgExp.Row).Value & ".jpg"
        ActiveSheet.ChartObjects("myChart").Delete
   
    Dim OutApp As Object
    Dim OutMail As Object


    Set OutApp = CreateObject("Outlook.Application")
    Set OutMail = OutApp.CreateItem(0)


    On Error Resume Next
    With OutMail
        .to = "[email protected]"
        .CC = ""
        .BCC = ""
   .Subject = "¥¼Ãº´Ú" & Date & WeekdayName(Weekday(Date)) & Time
        .Body = "¥¼Ãº´Ú" & Date & WeekdayName(Weekday(Date)) & Time
        '.Attachments.Add ActiveWorkbook.FullName
        'You can add other files also like this
        .Attachments.Add ("C:\Users\tcfv\Desktop\" & Range("A" & rgExp.Row).Value & ".jpg")
        .Send   'or use .Display
    End With
    On Error GoTo 0


    Set OutMail = Nothing
    Set OutApp = Nothing
   
     Sheets("¤º±bºÞ²z").Select
End Sub

ÁÂÁ¤j®a

Sub Mail_workbook_Outlook_1()
'Working in Excel 2000-2016
'This example send the last saved version of the Activeworkbook
'For Tips see: http://www.rondebruin.nl/win/winmail/Outlook/tips.htm



   
        Dim rgExp As Range
        ActiveSheet.Range("¿é¥X³øªí!A1:V4001").AutoFilter Field:=22, Criteria1:="<>"
  
        Set rgExp = Range("a1", ActiveSheet.Range("v65536").End(xlUp))

  

                 
        ''' Copy range as picture onto Clipboard
        rgExp.CopyPicture Appearance:=xlScreen, Format:=xlPrinter
        ''' Create an empty chart with exact size of range copied
        With ActiveSheet.ChartObjects.Add(Left:=rgExp.Left, Top:=rgExp.Top, _
        Width:=rgExp.Width, Height:=rgExp.Height)
        .Name = "myChart"


§ï¼g¦¨¥\¡A¦ý¬OÁÙ¤£¯à «ü©w ­þ­Ó¤u§@ï T_T

TOP

¥»©«³Ì«á¥Ñ momo020608 ©ó 2019-5-12 22:21 ½s¿è

Sheets("¿é¥X³øªí").Select
   
        Dim rgExp As Range
   
         Sheets("¿é¥X³øªí").Range("¿é¥X³øªí!A1:V4001").AutoFilter Field:=22, Criteria1:="<>"
  
        Set rgExp = Range("Sheets("¿é¥X³øªí")a1", Sheets("¿é¥X³øªí").Range("v65536").End(xlUp))

¦¨¥\¡A¦ý¬OÁÙ¤£¯à«ü©w­þ­Ó¤u§@ïT_T

´N¬O ¦b ¤u§@ï ³øªíA ®Éªºµe­±¡A«ü©w¥t¤@ ¤u§@ï "¿é¥X³øªí" ­ç°£ ªÅ¥Õ¡AµM«á ¿ï¨ú ¤u§@ï "¿é¥X³øªí" ¿z¿ïµ²ªG¡C

TOP

        ÀR«ä¦Û¦b : Ä@­n¤j¡B§Ó­n°í¡B®ð­n¬X¡B¤ß­n²Ó¡C
ªð¦^¦Cªí ¤W¤@¥DÃD