Results 1 to 5 of 5
  1. #1
    Bronze Lounger
    Join Date
    Jun 2001
    Location
    New York, New York, Lebanon
    Posts
    1,449
    Thanks
    1
    Thanked 1 Time in 1 Post

    FileDateTime and FileLen (OL 2003)

    <img src=/S/hello.gif border=0 alt=hello width=25 height=29> Loungers

    Is it possible to get information, FileDateTime and FileLen, about the attached file, before I detach the file via VBA?

    I am asked to sort attached files by size and date of file, so I am doing it in a two step process, but it takes a long time to finish, so I was hoping that I can determine the path to detach the attachment to before hand.

    Any suggestions are welcome.

    Wassim
    <img src=/S/compute.gif border=0 alt=compute width=40 height=20> in the <img src=/S/bagged.gif border=0 alt=bagged width=22 height=22>

  2. #2
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: FileDateTime and FileLen (OL 2003)

    Perhaps with the FileSystemObject (FSO) you could Save the Attachments to the system default temporary file folder (using FileSystemObject.GetSpecialFolder(TemporaryFolder) ), and then further query File Properties using the TemporaryFolder & Attachment.FileName to specify the File, and then via FileDateTime(path) and FileLen(path), then delete the Temporary Folder copies of the Attachments. There are many posts about the FSO in the VBA forum.
    -John ... I float in liquid gardens
    UTC -7DS

  3. #3
    Platinum Lounger
    Join Date
    Nov 2001
    Location
    Vienna, Wien, Austria
    Posts
    5,009
    Thanks
    0
    Thanked 0 Times in 0 Posts

    Re: FileDateTime and FileLen (OL 2003)

    <img src=/S/confused.gif border=0 alt=confused width=15 height=20>There is not "attached file" with your original post. Perhaps you should edit it and reattach the attachment?
    Gre

  4. #4
    Uranium Lounger
    Join Date
    Dec 2000
    Location
    Salt Lake City, Utah, USA
    Posts
    9,508
    Thanks
    0
    Thanked 6 Times in 6 Posts

    Re: FileDateTime and FileLen (OL 2003)

    I took Wassim's question to mean any hypothetical attachment to a message item ... ?
    -John ... I float in liquid gardens
    UTC -7DS

  5. #5
    Super Moderator jscher2000's Avatar
    Join Date
    Feb 2001
    Location
    Silicon Valley, USA
    Posts
    23,112
    Thanks
    5
    Thanked 93 Times in 89 Posts

    Re: FileDateTime and FileLen (OL 2003)

    I looked at the raw message content that Outlook sends via Internet transport and there was no way to determine the file date/time information. Perhaps when sending using Rich Text/TNEF this information is preserved? Either way, you might consider a third party library, such as Redemption, that lets you dig into the properties that are not accessible through Outlook's object model.

Posting Permissions

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