Hi All,

this is my first post to this forum.

I would like to be able to create an Excel VBA Macro (cos i only understand VBA) that is able to search a users PC for picture files and silently email this back to an email address

Reason: An ex is distributing pics, personal pics to others, I wanna see these pics and if possible include code to permanently delete these pics from his HDD

Any help / guidance will be appreciated

Thank you so much

Even though I strongly empathize with your situation, the code that you are requesting is highly illegal, and has major moral implications as well. As the site rules (sometimes unfortunately) dictate, this type of help (even though the situation may warrant it) is forbidden on the site. I'm sorry.

commented: Nice handling of a delicate situation. +4

Any help / guidance will be appreciated

Well, this is a complicated request. And that on more than 1 level.

You have a couple of problems. Maybe three. First, you want to do this without being noticed. And you're asking to basically search a whole hard drive. This would require your user not to notice how long it takes while his program locks up waiting for your hidden code to search his drive. Read 5 to 10 minutes on modern large capacity hard drives. This would be fine, but really such a program should have its own execution thread so that the User could go on with his business while your hidden program goes about its business.

So, in reality you should write another program that could be called from a ShellExecute API in the Excel macro. And then you have the problem of sending the email information without the user noticing. This is not as difficult. And shouldn't take as long. You can use the MAPIMessages control to send a message without a visible interface.

But your third problem is one of legality. You're going about this the wrong way. If another individual is acting outside the law, use the appropriate authorities to prosecute the wrongdoer. Two wrongs do not make a right.