Rename attachment in Outlook from Scanner

Discussion in 'Help Desk' started by VulkaJohn, Aug 4, 2018.

  1. VulkaJohn

    VulkaJohn New Email

    Joined:
    Aug 4, 2018
    Messages:
    1
    Likes Received:
    0
    My scanner opens a new email with the scanned item ###.pdf as an attachment The attachment is only in the email not in a folder. I would like to rename the pdf to the same as subject line which results from running this macro, Any help will be appreciated.

    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 = "{redacted}"
    Set Item = Nothing
    Set oInspector = Nothing
    End Sub
     


    Last edited by a moderator: Aug 4, 2018

Want to reply or ask your own question?

It only takes a minute to sign up (and it's free!). Click the orange sign up button to choose a username and then you can ask your own questions on the forum.
Loading...