- ©«¤l
- 216
- ¥DÃD
- 71
- ºëµØ
- 0
- ¿n¤À
- 292
- ÂI¦W
- 0
- §@·~¨t²Î
- window xp
- ³nÅ骩¥»
- 2007
- ¾\ŪÅv
- 20
- ©Ê§O
- ¤k
- µù¥U®É¶¡
- 2012-6-27
- ³Ì«áµn¿ý
- 2024-9-28
|
¦^´_ 5# GBKEE
¦«eµ¹§Úªº«ü¾É, ²{¨D±Ð¦p»Ý¨CÓPDF§¡µo¥X¤@Ó¹q¶l, ¤U¦Cªºµ{¦¡n¦p¦ó§ó§ï©O? ¨D½ç±Ð!
Sub ex()
Set d = CreateObject("Scripting.Dictionary")
With Worksheets("attendance report")
For Each a In .Range(.[E4], .[E4].End(xlDown))
d(a.Value) = "" '¨ú±o©Ò¦³¤£«½Æ¤À©±
Next
F = InputBox("Enter your month")
For Each ky In d.keys
.Range("B4").AutoFilter Field:=4, Criteria1:=ky
If Dir("C:\Users\mariasfy\Desktop\" & ky & "_" & F & ".pdf") <> "" Then Kill "C:\Users\mariasfy\Desktop\" & ky & "_" & F & "201507.pdf" '¦P¦WÀɮקR°£
.ExportAsFixedFormat Type:=xlTypePDF, Filename:= _
"C:\Users\mariasfy\Desktop\" & ky & "_" & F & ".pdf", Quality:=xlQualityStandard, IncludeDocProperties:=True, _
IgnorePrintAreas:=False, OpenAfterPublish:=False '¥t¦s¦¨PDFÀÉ®×
Next
Dim Mail_Object, Mail_Single As Variant
Email_Subject = "ªù¥«¥X¶Ô³ø§i"
Email_Cc = ""
Email_Bcc = ""
Email_Body = "ªù¥«¥X¶Ô³ø§i, ½Ð¦^ÂÐ"
Set Mail_Object = CreateObject("Outlook.Application")
Set Mail_Single = Mail_Object.CreateItem(o)
With Mail_Single
.Subject = Email_Subject
.To = Email_Send_To
.CC = Email_Cc
.BCC = Email_Bcc
.Body = Email_Body
.Attachments.Add ("C:\Users\mariasfy\Desktop\" & ky & "_" & F & ".pdf")
.Display
'.send
End With
If .FilterMode = True Then .ShowAllData 'Åã¥Ü©Ò¦³¸ê®Æ
End With
End Sub |
|