Macro to send files

G

Guest

Hi,

I need a macro to get the files in a folder and send each file to different
addresses.

Somebody can help me?

Regards,
SBárbara
 
M

Michael Bauer

Am Fri, 16 Jun 2006 09:52:01 -0700 schrieb SBárbara:

Easy to use for getting the files is the "Microsoft Scripting Runtime"
library, you can reference it via Tools/References. Its FileSystemObject has
the GetFolder function, which returns a Folder object, which in turn
provides you with a Files list.

Loop through that list and call for each file Outlook´s CreateItem function
to create a new MailItem. Append the file to the MailItem´s Attachment.Add
function.
 
G

Guest

Hi,

Thanks for your answer, but i need some help.
I don't find "Microsoft Scripting Runtime" Thanks
Can you help me?

Thanks
SBárbara

"Michael Bauer" escreveu:
 
M

Michael Bauer

Am Mon, 19 Jun 2006 15:24:04 -0700 schrieb SBárbara:

That entry should be in the mentioned dialog. Did you look there?
 
M

Michael Bauer

Am Tue, 20 Jun 2006 08:30:02 -0700 schrieb SBárbara:

That makes me curious. Do you get an error when running this:

Dim fso As Object
Set fso = CreateObject("Scripting.FileSystemObject")

If there´s no error the Scripting Runtime exists.

However, here is a sample for getting all files in a folder:
http://vbnet.mvps.org/code/fileapi/recursesave.htm
 
G

Guest

Sorry, but I am not programmer. Therefore it is difficult to understand the
necessary language… therefore i need a macro (already prepared) that it goes
to search a file or files in a folder and annex to a message, with subject
and body of message.

I'm sorry for the work that I am giving…

Regards,
Sandra Bárbara

"Michael Bauer" escreveu:
 
M

Michael Bauer

Am Wed, 21 Jun 2006 01:40:02 -0700 schrieb SBárbara:

Sandra, don´t worry, you don´t give work. I can tell you what to do, but
it´s your turn to do it then.

You could check the two lines I gave you. Using that FileSystemObject is the
easiest way. If for any reason it´s not on your PC you could try the sample.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top