Jump to content
Macro Express Forums

Retrieve Email attachement Files


Recommended Posts

Hello all,

 

I have more than 300 files on my email. What I want to do is to create a script from the macro express pro, and tell it to go to that folder on my email and retrieve all these files and save them to my hard drive. I don't want to go one-by-one to save each file to my hard drive. If there's anyone have a sample of this script or already done it can you share with me. I'll greatly appreciate.

 

Thank you all,

TTC.

Link to comment
Share on other sites

Do you want to save all the email messages as files or do you want to save the attachments in those messages as files?

 

If you are wanting to save all the messages as files all you have to do is select the ones you want and drag and drop them in a file folder.

 

I have a couple of macros that run in Outlook that automatically file correspondence in Outlook but they're all custom designed to put them in the correct client's folder following certain conventions. EG the names use the subject but start with a reverse order date stamp. In fact I'm rewriting the big one right now. If you needed something like that I'd be happy to write you something. Just contact me outside the forum via the links below.

 

BTW there are many third party utilities that do things like what I think you want to do already. You might checkout Slipstick.com. Sue has several lists of utilities like this.

Link to comment
Share on other sites

Sorry, I just read the subject of your post again and realized you do want the attachments. The best suggestion is to check out the existing third party tools for this on Slipstick.

Link to comment
Share on other sites

It is unlikely that anyone on this forum will be able to provide a script that does exactly what you want. Besides, we would need more information: Which email system are you using? Which version? And so on. And if your email client is configured differently than the person who wrote the script, the script may fail or malfunction. And because you are not sure how the code is supposed to work and what assumptions the developer made, you may have trouble figuring out what is wrong.

 

In other words, the macro you have it mind is best created by you!

 

The script that you want is an example of what I call a "disposable" macro. It fulfills a specific purpose. I develop a lot of disposable macros because it usually takes less time or less effort to automate a process than to perform it manually. A macro is disposable in the sense that you create the script, test it, debug it, refine it, use it, and delete it. (Or deactivate it. You may need it again or want to "borrow" the code for another script in the future.)

 

If you are new to Macro Express, this would be a great first project. It might take all day to script it, but once you figure it out, scripting will go a lot faster next time.

 

If you are using Outlook, the "secrets" of making a reliable macro to do what you want to do is to sort the messages so that the ones with attachments are grouped together, and then simulate the keystrokes to save all attachments. In Outlook 2007, these are:

 

Text Type (Simulate Keystrokes): <ALT>f // Alt + F activates the File menu

Text Type (Simulate Keystrokes): n // Save Attachments...

Text Type (Simulate Keystrokes): a // all

Link to comment
Share on other sites

It is unlikely that anyone on this forum will be able to provide a script that does exactly what you want. Besides, we would need more information: Which email system are you using? Which version? And so on. And if your email client is configured differently than the person who wrote the script, the script may fail or malfunction. And because you are not sure how the code is supposed to work and what assumptions the developer made, you may have trouble figuring out what is wrong.

 

In other words, the macro you have it mind is best created by you!

 

The script that you want is an example of what I call a "disposable" macro. It fulfills a specific purpose. I develop a lot of disposable macros because it usually takes less time or less effort to automate a process than to perform it manually. A macro is disposable in the sense that you create the script, test it, debug it, refine it, use it, and delete it. (Or deactivate it. You may need it again or want to "borrow" the code for another script in the future.)

 

If you are new to Macro Express, this would be a great first project. It might take all day to script it, but once you figure it out, scripting will go a lot faster next time.

 

If you are using Outlook, the "secrets" of making a reliable macro to do what you want to do is to sort the messages so that the ones with attachments are grouped together, and then simulate the keystrokes to save all attachments. In Outlook 2007, these are:

 

Text Type (Simulate Keystrokes): <ALT>f // Alt + F activates the File menu

Text Type (Simulate Keystrokes): n // Save Attachments...

Text Type (Simulate Keystrokes): a // all

Link to comment
Share on other sites

Hi Alan,

 

Thank you for your response. I'm currently using Microsoft outlook 2000 SP-3 (9.0.06627). And yes, I'm new to macro express pro. I know it'll take all day and I don't have a clue where to beging. That's why i'm asking if anyone have a script like that or a similear one that I can use. I also can rewrite it to complete what I need. Please let me know.

 

Thanks,

TTC.

Link to comment
Share on other sites

Hi Alan,

 

Thank you for your response. I'm currently using Microsoft outlook 2000 SP-3 (9.0.06627). And yes, I'm new to macro express pro. I know it'll take all day and I don't have a clue where to beging. That's why i'm asking if anyone have a script like that or a similear one that I can use. I also can rewrite it to complete what I need. Please let me know.

 

Thanks,

TTC.

 

1. To begin scripting, figure out how to perform the task manually. If you can work out the steps by pressing keys on the keyboard rather than clicking with the mouse, that will help. But even if you only know how in interact via the mouse, you may be able to record the actions and come up with a viable script.

 

2. Explore Macro Express. Check out every menu. Try every command. In other words, play! The context sensitive Help in Macro Express is better than most programs. If you spot a command that looks interesting, try making a macro that uses the command.

 

3. Try the "Quick Wizards" feature. This is a fabulous introduction. I use them in the courses I teach on Macro Express. See, for example, http://www.cantoraccess.com/presentations/synopses_presentations.html#resna2009fiveminutemacro

 

4. Experiment with the "Capture Macro" feature. This is how many of us got started with Macro Express: the computer will record your actions, and then you can play them back. I haven't used the feature in years because the scripts tend to be unreliable. But if you are looking for a point of entry, this is the ticket.

 

5. Ask lots of questions on this forum. There are many experienced and creative Macro Express users who regularly read the posts and contribute.

Link to comment
Share on other sites

Here's a small part to get you started. With the mail message open this little script will save the attachment with the default name to the last used folder.

<TEXT TYPE Action="0" Text="<ALT>fn"/>
<WAIT FOR WINDOW TITLE Title="Save Attachment" Partial="FALSE" Wildcards="FALSE" Indefinite="FALSE" Hours="0" Minutes="0" Seconds="9"/>
<TEXT TYPE Action="0" Text="<ALT>s"/>

You can copy this and paste it directly into the scripting editor.

 

So to set this up first manually save the file to a folder you want to use as the destination. Now delete that file and run this script. Your next step will be to wait for the message window title and then navigate with the keyboard to the next message. Let's see if you can do that part on your own from what you have learned here.

 

BTW I have low hourly rates ;-)

Link to comment
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...