Home |
Search |
Today's Posts |
#1
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
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 |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
emailing files from excel, the files will not go until I open up . | New Users to Excel | |||
Emailing Files | Excel Programming | |||
Delivery receipt when auto emailing | Excel Discussion (Misc queries) | |||
emailing excel files | Excel Discussion (Misc queries) | |||
Emailing files using a do until | Excel Programming |