Re: Can you automat saving attachments and emails to a directory
- From: "Neil1958" <Neil1958@xxxxxxxxxxxxxxxxxxxxxxxxx>
- Date: Sun, 11 Sep 2005 20:17:02 -0700
Allan thanks for the quick response
You have answered part of the question and the Marco to detach the
attachments works great.
The saving of the actual email is still a question.
A bit of back ground
I receive an email in the same format each time and from the same source.
I copy the body of the email into an excel sheet. By using the copy and
paste function then excel automatically convert all the info into excel
format. The data is then converted into one line in a database automatically.
Is there a Marco to save the email? As you would do manually with "File" and
"Save" from the menu. Like the attachment save macro you sent me.
If not then what would be the Marco to copy the content of the email ready
to paste.
I use Ctrl/A and then Ctrl/C, from that I paste it into the excel clean up
file directly as text.
Then the macro can detach the attachments and I would have the email content
ready yo paste into excel. I already have the macro in excel which takes it
from the paste step through all the rest.
Thanks
Neil
"Alan" wrote:
> "Neil1958" <Neil1958@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
> news:0ABE6174-F058-473E-A3DC-980559414D50@xxxxxxxxxxxxxxxx
> >
> > Open Inbox
> > Click on the new Email
> > Click on Marco which runs the following
> > Detaches any attachment in the Email to a set directory
> > Saves the text of the email to the same directory and a txt file or
> > doc.
> >
> > or could all the above be automated more by having the email do the
> > above as in arrived in the inbox as new mail. Set formated emails
> > only for do this.
> >
>
> Hi Neil,
>
> To save the emails to a folder, just drag them across and copy or move
> them. They will come across as MSG files which are fully functional
> outlook items that can be opened and then forwarded or replied to just
> like any other email in outlook.
>
> Try this to save attachments (change the path to suit).
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
> Sub ExtractAttachments()
>
> Dim MyItem As MailItem
> Dim MyAtt As Attachment
>
>
> Set SelectedItems = ActiveExplorer.Selection
>
>
> For Each MyItem In SelectedItems
>
> For Each MyAtt In MyItem.Attachments
>
> MyAtt.SaveAsFile "D:\Temp\" & MyAtt.DisplayName
>
> Next
>
> Next
>
> End Sub
>
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>
>
>
.
- Follow-Ups:
- References:
- Prev by Date: Re: Can you automat saving attachments and emails to a directory
- Next by Date: Re: Can you automat saving attachments and emails to a directory
- Previous by thread: Re: Can you automat saving attachments and emails to a directory
- Next by thread: Re: Can you automat saving attachments and emails to a directory
- Index(es):
Relevant Pages
|