Consulting

Results 1 to 2 of 2

Thread: Attachment Views

  1. #1
    VBAX Expert
    Joined
    Feb 2005
    Posts
    929
    Location

    Attachment Views

    this is not really a VBA question although it might lead to some VBA ...

    I am running Outlook2000 (I know, get with the program!). Attachements to emails received are often shown in a separate window at the bottom of the text window. ol2K supports 3 views of this information: small icon, large icon and list. The list option presently provides ~ 32 characters of file name for each file including a fair number consumed with attachment size. Is there any way to "expand" or reformat the list option so that I can see more of the file name for each attachment? I am working with a company that has a file nameing convention where the first 25 or so characters are hieroglyphics and the useful stuff starts about char posn 30. I can easily write a proc to interogate the email object and list any attachments, but then I have to match the list to the hieroglyphics to select anything.
    "It's not just the due date that's important, it's also the do date" [MWE]

    When your problem has been resolved, mark the thread SOLVED by clicking on the Thread Tools dropdown menu at the top of the thread.

  2. #2
    Knowledge Base Approver VBAX Master Oorang's Avatar
    Joined
    Jan 2007
    Posts
    1,135
    Location
    Unless there is a reg hack I don't know about, I don't believe that's an option. You could roll your own in vba as you suggested. Here is a very simple one. It assumes you already have the email open.
    [VBA]Public Sub ViewAttachments()
    Dim objTest As Object
    Dim mi As Outlook.MailItem
    Dim attch As Outlook.Attachment
    Dim strMsg As String
    Set objTest = Outlook.ActiveInspector.CurrentItem
    If TypeName(objTest) <> "MailItem" Then
    Exit Sub
    End If
    Set mi = objTest
    Set objTest = Nothing
    For Each attch In mi.Attachments
    strMsg = strMsg & attch.FileName & vbNewLine
    Next
    Set mi = Nothing
    If LenB(strMsg) Then
    MsgBox strMsg
    End If
    End Sub[/VBA]
    Cordially,
    Aaron



    Keep Our Board Clean!
    • Please Mark your thread "Solved" if you get an acceptable response (under thread tools).
    • Enclose your code in VBA tags then it will be formatted as per the VBIDE to improve readability.

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •