¥Îvba µoyahoo GMAIL ªº¹q¤l¶l¥ó¤£¥Î³z¹Loutlook
- ©«¤l
- 67
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 78
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- Excel 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-5-15
- ³Ì«áµn¿ý
- 2021-9-14
|
- Option Explicit
- Sub SendAsPDF()
- ' Uses early binding
- ' Requires a reference to the Outlook Object Library
- Dim OutlookApp As Outlook.Application
- Dim MItem As Object
- Dim Recipient As String, Subj As String
- Dim Msg As String, Fname As String
-
- ' Message details
- Recipient = "[email protected]"
- Subj = "Sales figures"
- Msg = "Hey boss, here's the PDF file you wanted."
- Msg = Msg & vbNewLine & vbNewLine & "-Frank"
- Fname = Application.DefaultFilePath & "\" & _
- ActiveWorkbook.Name & ".pdf"
-
- ' Create the attachment
- ActiveSheet.ExportAsFixedFormat _
- Type:=xlTypePDF, _
- Filename:=Fname
-
- ' Create Outlook object
- Set OutlookApp = New Outlook.Application
-
- ' Create Mail Item and send it
- Set MItem = OutlookApp.CreateItem(olMailItem)
- With MItem
- .To = Recipient
- .Subject = Subj
- .Body = Msg
- .Attachments.Add Fname
- .Save 'to Drafts folder
- '.Send
- End With
- Set OutlookApp = Nothing
- ' Delete the file
- Kill Fname
- End Sub
½Æ»s¥N½X
|
|
|
|
|
|
|
- ©«¤l
- 67
- ¥DÃD
- 8
- ºëµØ
- 0
- ¿n¤À
- 78
- ÂI¦W
- 0
- §@·~¨t²Î
- Windows XP
- ³nÅ骩¥»
- Excel 2010
- ¾\ŪÅv
- 20
- ©Ê§O
- ¨k
- µù¥U®É¶¡
- 2012-5-15
- ³Ì«áµn¿ý
- 2021-9-14
|
µù¡G¤Wzµ{¦¡½X¡A»Ýn¤Þ¥Î¡¨Microsoft Outlook 12.0 Object Library"
|
|
|
|
|
|
|