在Outlook中从扫描仪重命名附件

时间:2018-08-03 04:53:13

标签: outlook rename attachment

我的扫描仪会打开一封新电子邮件,其中包含扫描件###。pdf作为附件 附件仅在电子邮件中,不在文件夹中。 我想将pdf重命名为与运行此宏所产生的主题行相同的标题,将不胜感激。

 Sub ScanedForm()                                                                         
 SetAsHTML                                                                                      
 Dim MemNam As String                                                                     
 Dim Item As Outlook.MailItem                                                             
 Dim oInspector As Inspector                                                              
 Dim strSubject As String                                                                                             
 Set oInspector = Application.ActiveInspector                                             
 If oInspector Is Nothing Then                                                            
     Set Item = Application.ActiveExplorer.Selection.Item(1)                              
 Else                                                                                     
    Set Item = oInspector.CurrentItem                                                     
 End If                                                                                              
 MemNam = InputBox("MemberName")                                                                                              
 strSubject = Item.Subject                                                                
 strSubject = "Form Scanned at: " & Time & " For: " & MemNam                                                                                              
 Item.Subject = strSubject                                                                
 Item.To = "forms@anything.com"                                                                                              
 Set Item = Nothing                                                                       
 Set oInspector = Nothing                                                                 
 End Sub 

0 个答案:

没有答案