Solved

Using Outlook Trigger for FTP interaction, Possibly with VBA

Posted on 2013-01-14
6
629 Views
Last Modified: 2013-01-29
Is there a way to automate Interaction with an FTP based on incoming or outgoig emial in outlook? I have been looking for an email client /  FTP client i none platform that would allow for this type of interaction but can't seem to find one. Maybe there is some VBA that allows for this to be possible?
0
Comment
Question by:DB-aha
  • 3
  • 3
6 Comments
 
LVL 57
ID: 38774745
<< Maybe there is some VBA that allows for this to be possible?>>

 Short answer is yes.  You can inspect incoming/outgoing e-mails in Outlook in VBA and you can FTP in VBA as well so yes, it can be done.

 Actually doing it however is a little more complex.

 Maybe a little more detail on what it is exactly what your trying to do would be helpful.

Jim.
0
 
LVL 1

Author Comment

by:DB-aha
ID: 38775399
From a high level:

TASK 1
- Outlook gets an email from a recipient with a certain subject header or text in the body of the email

- This triggers an access macro

-The end of the access macro will send out an outgoing email

TASK 2

- An approval email will be received by outlook

- 2 different files on local and shared drives are to be uploaded to an FTP location.

- 2 different emails are sent out to 2 different recipients when the transfer to the FTP is completed.

There are some additional steps for when we get an email that will trigger us to sign into an FTP and retrieve the most recent file as well. Please let me know if you need more details.
0
 
LVL 57
ID: 38775517
and do you have any of this in place as of yet or no?  (assuming no).

Outside of the FTP, do you know how to tackle it or no?  

The question covers quite a bit of ground...

Jim.
0
What Security Threats Are You Missing?

Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

 
LVL 1

Author Comment

by:DB-aha
ID: 38788830
The access macros are in place. The only elements of the access macros that are not developed are the email interaction and the FTP interaction. I have no experience in VBA and know not how to do the FTP interaction or the email interaction.
0
 
LVL 57

Accepted Solution

by:
Jim Dettman (Microsoft MVP/ EE MVE) earned 500 total points
ID: 38788983
Your going to need to break this down into multiple questions as it covers quite a bit of ground.

In summary though, for e-mail you can:

1. Talk to Outlook with OLE Automation and send the e-mail that way

2. Use the CDO lib

3. Talk directly to an SMTP server with something like vbSendMail or Blat

4. Buy a 3rd party mail control.

 Since you are receiving e-mail from Outlook, that's the route I'd go as your sure it will be installed.  Then you don't have to worry about usernames accounts.

For the FTP, you can:

1. Use something like this which uses the Wininet lib:

http://access.mvps.org/access/modules/mdl0037.htm

2. Script the commands and use the built-in FTP client:

http://access.mvps.org/access/modules/mdl0015.htm

3. Buy a 3rd party FTP control.

 The first is not too hard, #2 is easy but not quite as neat of a solution.  It's easy to troublshoot though because you can test the commands, write the script, then test the script as individual steps.

I would work on one piece at a time and post questions as you run into problem pointing back to here.

Jim.
0
 
LVL 1

Author Closing Comment

by:DB-aha
ID: 38832950
I will close this ticket and assign full points. From initial review, it looks correct. I have not been able to try it but I had someone review it and said it was good to try.
0

Featured Post

Comprehensive Backup Solutions for Microsoft

Acronis protects the complete Microsoft technology stack: Windows Server, Windows PC, laptop and Surface data; Microsoft business applications; Microsoft Hyper-V; Azure VMs; Microsoft Windows Server 2016; Microsoft Exchange 2016 and SQL Server 2016.

Join & Write a Comment

Use email signature images to promote corporate certifications and industry awards.
Not sure what the best email signature size is? Are you worried about email signature image size? Follow this best practice guide.
The viewer will learn how to simulate a series of coin tosses with the rand() function and learn how to make these “tosses” depend on a predetermined probability. Flipping Coins in Excel: Enter =RAND() into cell A2: Recalculate the random variable…
This video shows how to remove a single email address from the Outlook 2010 Auto Suggestion memory. NOTE: For Outlook 2016 and 2013 perform the exact same steps. Open a new email: Click the New email button in Outlook. Start typing the address: …

762 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

24 Experts available now in Live!

Get 1:1 Help Now