Re: Can you automat saving attachments and emails to a directory

Tech-Archive recommends: Repair Windows Errors & Optimize Windows Performance



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
>
>
> +-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+-+
>
>
>
>
.



Relevant Pages

  • Re: Can you send a mail merge to a large group WITH an attachment?
    ... Create a new Excel spreadsheet. ... articles and once you've mastered plain mail merge - without attachments - ... "Directory Source.xls" as your data source. ... The result is a new Word document, which has a table with all of the ...
    (microsoft.public.word.mailmerge.fields)
  • Re: How can I read .xls documents in Word 2000?
    ... Your friends could also obtain (free ... You also could download the Excel viewer from Microsft's web site. ... > I would like to just be able to read .xls attachments that come from e-mail ... > friends that do team lists, rosters, phone lists, etc. on their computers at ...
    (microsoft.public.word.docmanagement)
  • Re: How do I find an Excel spreadsheet opened as attachment in Outlook
    ... > relate to Excel. ... I opened it and spent a great deal of time adding ... I have spent a great deal of time searching ... I did read that Outlook attachments are saved ...
    (microsoft.public.office.misc)
  • Re: Excel to DSORG=PS conversion
    ... Herman Stocker ... Of Steve Comstock ... I have data given to me in an excel spreadsheet. ... The sender believes that this E-mail and any attachments were free of any ...
    (bit.listserv.ibm-main)
  • Re: Reading Attachments
    ... Do you only encounter this behavior when opening Word or Excel attachments? ... Are these problem attachments sent by someone using MS Outlook and RTF formatting? ... DES wrote: ... ~Robear Dyer ...
    (microsoft.public.windows.inetexplorer.ie6_outlookexpress)