![]() |
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. |
|
|
Thread Tools | Search this Thread | Display Modes |
|
#1
|
|||
|
|||
![]()
Am Thu, 27 Jul 2006 07:42:02 -0700 schrieb csergent:
The MailItem has an Attachment collection. You could loop through that and save each object with SaveAsFile. That object also has a FileName property, which you can read and use for the SaveAsFile method. An example is availabe in the VBA help. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I receive files that are attachments, usually .xls or .txt files. I would like to write code that selects the attachment and saves it to the appropriate location. My files are usually named randomName.txt as I don't know what the name of the file will be. The step I go through now is to right click and then select save as and then name the file. One step further- Sometimes I receive two files. They will have common names but might place the date or other variable in the name; how could I select this through vba(the appropriate file and then save it)? Example: I receive two attachments that are - file0725.txt and another that is named businessTooMuchInformation.txt. I would like to be able to select each file in turn and save the them with the new name of: file.txt and business.txt How would I do this? |
#2
|
|||
|
|||
![]()
Michael,
I will try this and let you know what the outcome is. Thanks again. Chris "Michael Bauer" wrote: Am Thu, 27 Jul 2006 07:42:02 -0700 schrieb csergent: The MailItem has an Attachment collection. You could loop through that and save each object with SaveAsFile. That object also has a FileName property, which you can read and use for the SaveAsFile method. An example is availabe in the VBA help. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I receive files that are attachments, usually .xls or .txt files. I would like to write code that selects the attachment and saves it to the appropriate location. My files are usually named randomName.txt as I don't know what the name of the file will be. The step I go through now is to right click and then select save as and then name the file. One step further- Sometimes I receive two files. They will have common names but might place the date or other variable in the name; how could I select this through vba(the appropriate file and then save it)? Example: I receive two attachments that are - file0725.txt and another that is named businessTooMuchInformation.txt. I would like to be able to select each file in turn and save the them with the new name of: file.txt and business.txt How would I do this? |
#3
|
|||
|
|||
![]()
Michael,
This has worked very well. I click on the link that I receive in my e-mail so that I can mark this as helpful but get sent to: "The Page You Have Requested is Not Available." And then I click on the FAQ's page, but I wasn't sure what to select since the problem was with the support page. I hope that this message is noticed, because I do want give credit to the users that help me out on this site. Thanks again. Chris "Michael Bauer" wrote: Am Thu, 27 Jul 2006 07:42:02 -0700 schrieb csergent: The MailItem has an Attachment collection. You could loop through that and save each object with SaveAsFile. That object also has a FileName property, which you can read and use for the SaveAsFile method. An example is availabe in the VBA help. -- Viele Gruesse / Best regards Michael Bauer - MVP Outlook -- www.VBOffice.net -- I receive files that are attachments, usually .xls or .txt files. I would like to write code that selects the attachment and saves it to the appropriate location. My files are usually named randomName.txt as I don't know what the name of the file will be. The step I go through now is to right click and then select save as and then name the file. One step further- Sometimes I receive two files. They will have common names but might place the date or other variable in the name; how could I select this through vba(the appropriate file and then save it)? Example: I receive two attachments that are - file0725.txt and another that is named businessTooMuchInformation.txt. I would like to be able to select each file in turn and save the them with the new name of: file.txt and business.txt How would I do this? |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Thread Starter | Forum | Replies | Last Post |
saving attachments | T | Outlook Express | 1 | April 16th 06 04:16 PM |
saving attachments | tom | Outlook - General Queries | 2 | April 10th 06 05:17 PM |
saving attachments | andy | Outlook Express | 2 | February 15th 06 12:51 PM |
Saving Attachments | Raj Mazumdar | Outlook Express | 14 | January 22nd 06 11:40 AM |
Saving Attachments | [email protected] | Add-ins for Outlook | 0 | January 11th 06 07:27 PM |