Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Auto emailing of files

I have a batch of files for different customer, always called by the customer
name, but the contents of each file changes, and they are always saved in the
same folder.

I would like to email these files to my customers, automatically.

In another spreadsheet, I have the file (company) name in column A, and the
email address (es) in column B and / or C etc.

I would like some kind of macro, to look in column A for the company name,
which will be the file name, and go to the file always saved in the same
directory, attached it to an email, and email it to the address (es) in
column B, C etc.

This is to prevent having tio email all the files manually.

Using Excel 2003 and Outlook 2003.

Any help / guidance is aprpeciated.

Thank you
Richard

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 11,123
Default Auto emailing of files

Start with this example
http://www.rondebruin.nl/mail/folder2/files.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm




"Slyda" wrote in message ...
I have a batch of files for different customer, always called by the customer
name, but the contents of each file changes, and they are always saved in the
same folder.

I would like to email these files to my customers, automatically.

In another spreadsheet, I have the file (company) name in column A, and the
email address (es) in column B and / or C etc.

I would like some kind of macro, to look in column A for the company name,
which will be the file name, and go to the file always saved in the same
directory, attached it to an email, and email it to the address (es) in
column B, C etc.

This is to prevent having tio email all the files manually.

Using Excel 2003 and Outlook 2003.

Any help / guidance is aprpeciated.

Thank you
Richard


__________ Information from ESET Smart Security, version of virus signature database 3943 (20090317) __________

The message was checked by ESET Smart Security.

http://www.eset.com




__________ Information from ESET Smart Security, version of virus signature database 3943 (20090317) __________

The message was checked by ESET Smart Security.

http://www.eset.com



  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 25
Default Auto emailing of files

Using Ron's code (which probably has saved thousands of manhours,thx Ron )
have the email saved in the drafts folder:
....
.Display 'either .Send or .Display
.Save
.Close olPromtForSave 'saves in Drafts folder
....

Then have the following in the Outlook projects module which will send all
the addressed mail in the Draft folder without having to open and send each
one, provided your drafts folder is one level below the parent folder:

Public Sub SendDrafts()

Dim draftItem As Long
Dim myOutlook As Outlook.Application
Dim myNameSpace As Outlook.NameSpace
Dim myFolders As Outlook.Folders
Dim myDraftsFolder As Outlook.MAPIFolder

'''''''send all items in the Drafts folder that are addressed
Set myOutlook = Outlook.Application
Set myNameSpace = myOutlook.GetNamespace("MAPI")
Set myFolders = myNameSpace.Folders

Set fdrInbox =
Application.GetNamespace("MAPI").GetDefaultFolder( olFolderInbox).Parent
Set myDraftsFolder = myFolders(Format(fdrInbox, ("Drafts")
For draftItem = myDraftsFolder.Items.Count To 1 Step -1
If Len(Trim(myDraftsFolder.Items.Item(draftItem).To)) 0 Then
myDraftsFolder.Items.Item(draftItem).Send
End If
Next draftItem

Set myDraftsFolder = Nothing
Set myNameSpace = Nothing
Set myOutlook = Nothing

MsgBox "Done", vbInformation, "Send Contents of Draft Folder"

End Sub

--
MacGuy


"Ron de Bruin" wrote:

Start with this example
http://www.rondebruin.nl/mail/folder2/files.htm


--

Regards Ron de Bruin
http://www.rondebruin.nl/tips.htm


Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
emailing files from excel, the files will not go until I open up . joe New Users to Excel 2 September 18th 09 02:12 PM
Emailing Files LoriH Excel Programming 3 October 6th 08 08:04 PM
Delivery receipt when auto emailing Brettjg Excel Discussion (Misc queries) 4 March 3rd 08 10:14 PM
emailing excel files jayare Excel Discussion (Misc queries) 0 March 30th 06 12:46 PM
Emailing files using a do until a Excel Programming 6 February 19th 05 04:33 PM


All times are GMT +1. The time now is 09:10 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"