|
[广告] Excel易用宝 - 提升Excel的操作效率 · Excel / WPS表格插件 ★ 免费下载 ★ ★ 使用帮助★
Sub PrintSelectedMessages() Dim olApp As Outlook.Application Dim olExp As Outlook.Explorer Dim olSel As Outlook.Selection Dim olMail As Outlook.MailItem Dim i As Integer Set olApp = Outlook.Application Set olExp = olApp.ActiveExplorer Set olSel = olExp.Selection On Error Resume Next For i = 1 To olSel.Count If olSel.Item(i).Class = olMail Then Set olMail = olSel.Item(i) With olMail .PrintOut PrintRange:=olPrintRangeFromTo, FromPage:=1, ToPage:=1, _ PrintItem:=olPrintItemMessage, Copies:=1, _ PageType:=olPageTypeAllPages, PrintStyle:=olPrintStyleSinglePage, _ Collate:=True, Background:=False, PrintHidden:=False End With End If Next iEnd Sub
来自AI,请测试
|
|