PDA

View Full Version : Attachment Views



MWE
05-14-2008, 11:11 AM
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.

Oorang
06-09-2008, 12:21 PM
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.
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