Ask the Expert

Saving some e-mail attachments modifies date

I am trying to save all e-mail attachments to a local hard drive. If I use the following code, it modifies some attachments' modify date. I don't know why this only happens with some attachments. Can you help me?
Dim db As NotesDatabase 
Dim view As NotesView 
Dim doc As NotesDocument 
Dim object As NotesEmbeddedObject 
Set db = New NotesDatabase( "server", "db" ) Set view = db.GetView( "viewname" )
Set doc = view.GetLastDocument Forall o In doc.EmbeddedObjects Set object = doc.GetAttachment( o ) Call notesEmbeddedObject.ExtractFile( "path to save file to" ) Call
notesEmbeddedObject.Remove End Forall
This issue has been reported in the Notes forum.

It would appear that if the modification date in the file's properties is AFTER the file's creation date (normally due to copying a file to another location using Windows), then the file when detached to disk has these dates reset, as you have indicated in your question.

Another user posted a similar issue when attaching/extracting files from different disk format's (i.e., NTFS/FAT).

I haven't investigated this myself, but I hope this information points you in the right direction.

This was first published in June 2005

There are Comments. Add yours.

TIP: Want to include a code block in your comment? Use <pre> or <code> tags around the desired text. Ex: <code>insert code</code>

REGISTER or login:

Forgot Password?
By submitting you agree to receive email from TechTarget and its partners. If you reside outside of the United States, you consent to having your personal data transferred to and processed in the United States. Privacy
Sort by: OldestNewest

Forgot Password?

No problem! Submit your e-mail address below. We'll send you an email containing your password.

Your password has been sent to: