A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

Saving attachemtns automatically



 
 
Thread Tools Search this Thread Display Modes
  #11  
Old November 15th 07, 07:42 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Saving attachemtns automatically

Got it. Thanks! That's cool.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Dmitry Streblechenko" wrote in message ...
Outlook sets them to the real file system dates (ftCreationTime and
ftLastWriteTime).
Even under POP3, you should be able to see these properties on the messages
in your Sent Items folder.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
That would explain why I don't see them, since I was looking at POP3 data.
Are the values related to when the attachment itself was originally created
or modified as a file or do they reflect when the message itself was
created/modified?

"Dmitry Streblechenko" wrote in message
...
Actually Exchange (when a message is sent between two mailboxes) preserves
PR_LAST_MODIFICATION_TIME and PR_CREATION_TIME on attachments. When a
message is received over POP3, these properties are gone obviously.

"Sue Mosher [MVP-Outlook]" wrote in message
...
An attachment in a mail message has no date properties. The only date
information available would be the date properties associated with the
parent message.



"Frank" wrote in message
...

I would like to overwrite the file in my local folder only if the latest
attachment file is newer than the one already stored. Oftentimes, I
receive
iterations of the same file name.

Currently, I'm using a randomizer:

Set objFSO = CreateObject("Scripting.FileSystemObject")
objMessage.Attachments.Item(i).SaveAsFile "C:\mailarchive\attachments\" &
strTempFile & "_" & _
objMessage.Attachments.Item(i).FileName

I would like to modify to:
IF mylocalfile.date attachement.date THEN
SaveAsFile

"Sue Mosher [MVP-Outlook]" wrote in message
...

2) "Older" compared with what? You can work with the attachment itself
only
after it has been saved.

"Frank" wrote in message
...

A new question:
Is there a way to check the date of the attachment item? I would like to
overwrite older attachments.





Ads
  #12  
Old November 15th 07, 07:44 PM posted to microsoft.public.outlook.program_vba
Sue Mosher [MVP-Outlook]
external usenet poster
 
Posts: 11,651
Default Saving attachemtns automatically

You would need to use Outlook 2007, CDO 1.21, or Redemption (http://www.dimastr.com/redemption) because those are hidden MAPI properties. But first you might want to use Dmitry's Outlook Spy tool or the free MFCMAPI.exe tool from Microsoft to see if they're available on your data.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Frank" wrote in message ...
Hi,

How could I retrieve that information programmatically?


"Dmitry Streblechenko" wrote in message
...
Outlook sets them to the real file system dates (ftCreationTime and
ftLastWriteTime).
Even under POP3, you should be able to see these properties on the
messages in your Sent Items folder.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
That would explain why I don't see them, since I was looking at POP3 data.
Are the values related to when the attachment itself was originally
created or modified as a file or do they reflect when the message itself
was created/modified?

"Dmitry Streblechenko" wrote in message
...
Actually Exchange (when a message is sent between two mailboxes)
preserves
PR_LAST_MODIFICATION_TIME and PR_CREATION_TIME on attachments. When a
message is received over POP3, these properties are gone obviously.

"Sue Mosher [MVP-Outlook]" wrote in message
...
An attachment in a mail message has no date properties. The only date
information available would be the date properties associated with the
parent message.



"Frank" wrote in message
...

I would like to overwrite the file in my local folder only if the latest
attachment file is newer than the one already stored. Oftentimes, I
receive
iterations of the same file name.

Currently, I'm using a randomizer:

Set objFSO = CreateObject("Scripting.FileSystemObject")
objMessage.Attachments.Item(i).SaveAsFile "C:\mailarchive\attachments\"
&
strTempFile & "_" & _
objMessage.Attachments.Item(i).FileName

I would like to modify to:
IF mylocalfile.date attachement.date THEN
SaveAsFile

"Sue Mosher [MVP-Outlook]" wrote in message
...

2) "Older" compared with what? You can work with the attachment itself
only
after it has been saved.

"Frank" wrote in message
...

A new question:
Is there a way to check the date of the attachment item? I would like
to
overwrite older attachments.


  #13  
Old November 15th 07, 07:58 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Saving attachemtns automatically

Redemption also explicitly exposes them as Attachment/RDOAttachment.
LastModificationTime / CreationTime properties.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
You would need to use Outlook 2007, CDO 1.21, or Redemption
(http://www.dimastr.com/redemption) because those are hidden MAPI
properties. But first you might want to use Dmitry's Outlook Spy tool or the
free MFCMAPI.exe tool from Microsoft to see if they're available on your
data.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Frank" wrote in message
...
Hi,

How could I retrieve that information programmatically?


"Dmitry Streblechenko" wrote in message
...
Outlook sets them to the real file system dates (ftCreationTime and
ftLastWriteTime).
Even under POP3, you should be able to see these properties on the
messages in your Sent Items folder.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
That would explain why I don't see them, since I was looking at POP3
data.
Are the values related to when the attachment itself was originally
created or modified as a file or do they reflect when the message itself
was created/modified?

"Dmitry Streblechenko" wrote in message
...
Actually Exchange (when a message is sent between two mailboxes)
preserves
PR_LAST_MODIFICATION_TIME and PR_CREATION_TIME on attachments. When a
message is received over POP3, these properties are gone obviously.

"Sue Mosher [MVP-Outlook]" wrote in message
...
An attachment in a mail message has no date properties. The only date
information available would be the date properties associated with the
parent message.



"Frank" wrote in message
...

I would like to overwrite the file in my local folder only if the
latest
attachment file is newer than the one already stored. Oftentimes, I
receive
iterations of the same file name.

Currently, I'm using a randomizer:

Set objFSO = CreateObject("Scripting.FileSystemObject")
objMessage.Attachments.Item(i).SaveAsFile "C:\mailarchive\attachments\"
&
strTempFile & "_" & _
objMessage.Attachments.Item(i).FileName

I would like to modify to:
IF mylocalfile.date attachement.date THEN
SaveAsFile

"Sue Mosher [MVP-Outlook]" wrote in message
...

2) "Older" compared with what? You can work with the attachment itself
only
after it has been saved.

"Frank" wrote in message
...

A new question:
Is there a way to check the date of the attachment item? I would like
to
overwrite older attachments.



  #14  
Old November 15th 07, 08:00 PM posted to microsoft.public.outlook.program_vba
Frank[_3_]
external usenet poster
 
Posts: 5
Default Saving attachemtns automatically

That is probably not an option for me as I'm programming this on a corporate
load of outlook and OS?

"Dmitry Streblechenko" wrote in message
...
Redemption also explicitly exposes them as Attachment/RDOAttachment.
LastModificationTime / CreationTime properties.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
You would need to use Outlook 2007, CDO 1.21, or Redemption
(http://www.dimastr.com/redemption) because those are hidden MAPI
properties. But first you might want to use Dmitry's Outlook Spy tool or
the free MFCMAPI.exe tool from Microsoft to see if they're available on
your data.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Frank" wrote in message
...
Hi,

How could I retrieve that information programmatically?


"Dmitry Streblechenko" wrote in message
...
Outlook sets them to the real file system dates (ftCreationTime and
ftLastWriteTime).
Even under POP3, you should be able to see these properties on the
messages in your Sent Items folder.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
That would explain why I don't see them, since I was looking at POP3
data.
Are the values related to when the attachment itself was originally
created or modified as a file or do they reflect when the message itself
was created/modified?

"Dmitry Streblechenko" wrote in message
...
Actually Exchange (when a message is sent between two mailboxes)
preserves
PR_LAST_MODIFICATION_TIME and PR_CREATION_TIME on attachments. When a
message is received over POP3, these properties are gone obviously.

"Sue Mosher [MVP-Outlook]" wrote in message
...
An attachment in a mail message has no date properties. The only date
information available would be the date properties associated with the
parent message.


"Frank" wrote in message
...

I would like to overwrite the file in my local folder only if the
latest
attachment file is newer than the one already stored. Oftentimes, I
receive
iterations of the same file name.

Currently, I'm using a randomizer:

Set objFSO = CreateObject("Scripting.FileSystemObject")
objMessage.Attachments.Item(i).SaveAsFile
"C:\mailarchive\attachments\"
&
strTempFile & "_" & _
objMessage.Attachments.Item(i).FileName

I would like to modify to:
IF mylocalfile.date attachement.date THEN
SaveAsFile

"Sue Mosher [MVP-Outlook]" wrote in message
...

2) "Older" compared with what? You can work with the attachment itself
only
after it has been saved.

"Frank" wrote in message
...

A new question:
Is there a way to check the date of the attachment item? I would like
to
overwrite older attachments.





  #15  
Old November 15th 07, 09:16 PM posted to microsoft.public.outlook.program_vba
Dmitry Streblechenko
external usenet poster
 
Posts: 2,116
Default Saving attachemtns automatically

Then your only options are
1. Outlook 2007 (Attachment.PropertyAccessor)
2. Extended MAPI (C++ or Delphi only)
3. CDO 1.21 (Attachment.Fields) - CDO 1.21 is an optional component in
Outlook 2002/2003, and is not installed at all by Outlook 2007.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Frank" wrote in message
...
That is probably not an option for me as I'm programming this on a
corporate load of outlook and OS?

"Dmitry Streblechenko" wrote in message
...
Redemption also explicitly exposes them as Attachment/RDOAttachment.
LastModificationTime / CreationTime properties.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
You would need to use Outlook 2007, CDO 1.21, or Redemption
(http://www.dimastr.com/redemption) because those are hidden MAPI
properties. But first you might want to use Dmitry's Outlook Spy tool or
the free MFCMAPI.exe tool from Microsoft to see if they're available on
your data.

--
Sue Mosher, Outlook MVP
Author of Microsoft Outlook 2007 Programming:
Jumpstart for Power Users and Administrators
http://www.outlookcode.com/article.aspx?id=54


"Frank" wrote in message
...
Hi,

How could I retrieve that information programmatically?


"Dmitry Streblechenko" wrote in message
...
Outlook sets them to the real file system dates (ftCreationTime and
ftLastWriteTime).
Even under POP3, you should be able to see these properties on the
messages in your Sent Items folder.

Dmitry Streblechenko (MVP)
http://www.dimastr.com/
OutlookSpy - Outlook, CDO
and MAPI Developer Tool

"Sue Mosher [MVP-Outlook]" wrote in message
...
That would explain why I don't see them, since I was looking at POP3
data.
Are the values related to when the attachment itself was originally
created or modified as a file or do they reflect when the message
itself
was created/modified?

"Dmitry Streblechenko" wrote in message
...
Actually Exchange (when a message is sent between two mailboxes)
preserves
PR_LAST_MODIFICATION_TIME and PR_CREATION_TIME on attachments. When a
message is received over POP3, these properties are gone obviously.

"Sue Mosher [MVP-Outlook]" wrote in message
...
An attachment in a mail message has no date properties. The only date
information available would be the date properties associated with the
parent message.


"Frank" wrote in message
...

I would like to overwrite the file in my local folder only if the
latest
attachment file is newer than the one already stored. Oftentimes, I
receive
iterations of the same file name.

Currently, I'm using a randomizer:

Set objFSO = CreateObject("Scripting.FileSystemObject")
objMessage.Attachments.Item(i).SaveAsFile
"C:\mailarchive\attachments\"
&
strTempFile & "_" & _
objMessage.Attachments.Item(i).FileName

I would like to modify to:
IF mylocalfile.date attachement.date THEN
SaveAsFile

"Sue Mosher [MVP-Outlook]" wrote in message
...

2) "Older" compared with what? You can work with the attachment
itself
only
after it has been saved.

"Frank" wrote in message
...

A new question:
Is there a way to check the date of the attachment item? I would
like
to
overwrite older attachments.







 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Saving Photos B.W. Outlook Express 2 October 20th 07 06:32 AM
Stopping automatically saving email adresses to my contacts? [email protected] Outlook - Using Contacts 1 August 2nd 06 07:08 PM
Automatically saving attachments of a pst into windows folder Christian Goeller Outlook - General Queries 0 March 28th 06 10:23 AM
Saving Attachments [email protected] Add-ins for Outlook 0 January 11th 06 07:27 PM
Saving emails Daniel Outlook Express 3 January 9th 06 01:35 PM


All times are GMT +1. The time now is 11:11 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.