Renaming E-mail attachment in outlook or thunderbird

Hi Guys,

Here's my problem. I have a standalone computer and a server. both run the same database. On the server the SQL database in synchronized with a program called DBsinc to the ms access database.
I also have changes on my computer and need some way to update the database on the server and update my own database from the server database. I know this is not the way I should approach this problem but it looks like it's my only option for the moment.
Due to security reasons where I work it is not possible to go around this using FTP. That means my only way out is by using email. I have written some code to automatically send an email and attached a table with the necessary update data. Now I need some way to get the attachment out of the email with VBA. Im currently using Thunderbird witch has the option to store attachments in a different folder on the computer. Unfortunately it refuses to do so.

What I need to know is how to isolate a attachment from an email and save it in a specified folder. Using thunderbird, outlook or any other program I can easily download is just fine.
LVL 1
dpragerAsked:
Who is Participating?

[Product update] Infrastructure Analysis Tool is now available with Business Accounts.Learn More

x
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Chris BottomleySoftware Quality Lead EngineerCommented:
As an exampole see her for outlook.

Any clarification or tweaking required then of course ask.

Chris
0
Chris BottomleySoftware Quality Lead EngineerCommented:
0

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
dpragerAuthor Commented:
Thanx,

The code you gave me Works perfect. There are just a few little things that need to alter.

The code only removes the attachments of the selected emails and puts them in the specified folder entered in the input box. Im lazy so I dont want to open Outlook explorer and select the specified email.

Is there a way in the code to select all of the emails listed in inbox and replace all of the attachments of the email messages there? I think I should alter the code listed below but I dont really know how.

Second of all I get a message that program is trying to alter my emails ( can I get rid of this annoying message ? )

On Error Resume Next
   
    'work on selected items
    Set myOlExp = myOlApp.ActiveExplorer
    Set myOlSel = myOlExp.Selection ( needs to be all emails  in inbox in this line)
   
    'for all items do...
    For Each myItem In myOlSel
   
        'point on attachments
        Set myAttachments = myItem.Attachments
       
        'if there are some...
        If myAttachments.Count > 0 Then
       
0
Big Business Goals? Which KPIs Will Help You

The most successful MSPs rely on metrics – known as key performance indicators (KPIs) – for making informed decisions that help their businesses thrive, rather than just survive. This eBook provides an overview of the most important KPIs used by top MSPs.

Chris BottomleySoftware Quality Lead EngineerCommented:
1. To select all items:
change
    Set myOlExp = myOlApp.ActiveExplorer
    Set myOlSel = myOlExp.Selection ( needs to be all emails  in inbox in this line)
     
    'for all items do...
    For Each myItem In myOlSel
to
    Set myOlExp = myOlApp.ActiveExplorer
    Set myOlSel = myOlExp..getnamespace("MAPI").getdefaultfolder(6)
   
    'for all items do...
    For Each myItem In myOlSel.items

Ought to do it.

2. Pesky message, assuming 2003 or earlier then personally I find  mapilab to be ideal but see:
You can modify your code to use redemption:
http://www.dimastr.com/redemption/

You can use an outlook add-in i.e:
http://www.mapilab.com/outlook/security

Or finally you can use clickyes
http://www.contextmagic.com/

ANy help?

Chris

 
0
dpragerAuthor Commented:
Thanx again,

But don't have it working yet. The counter stays empty in some strange way. Could you please take a look at the attached screenshot.

< i >  is empty so the VB code gets caught in an infinite loop and the program crashes.



0
dpragerAuthor Commented:
Thanx again,

But don't have it working yet. The counter stays empty in some strange way. Could you please take a look at the attached screenshot.

< i >  is empty so the VB code gets caught in an infinite loop and the program crashes.




SCR.JPG
0
Chris BottomleySoftware Quality Lead EngineerCommented:
Looks alright albeit I don't have 2000.

If you set a watch on i, and step through the delete block how does it look on entry and on each step?

Chris
0
Chris BottomleySoftware Quality Lead EngineerCommented:
The other thing is use the mechanism:

for i = myattachments.count to 1 step -1
     save it
     delete it
next

Chris
0
dpragerAuthor Commented:
Thanx, it took me a while to get corking the way I wanted it to but it works great now !!

Thanx Defenitly worth full points !!
0
Chris BottomleySoftware Quality Lead EngineerCommented:
Glad to be of some help and thank you for the grade.

Chris
0
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Microsoft Access

From novice to tech pro — start learning today.