![]() |
Email and/or Zipping data
from Excel. |
|
Automatically zipping Excel Files Create Outlook Distributi Email from Excel Include Email Signature from Outlook when Emailing via VBA |
| Zipping Files From Excel If you need to save and automatically zip a spreadsheet or workbook (or part of) from Excel, please see the following links. http://www.cpearson.com/excel/SaveCopyAndZip.htm http://www.vbaccelerator.com/home/VB/Code/Libraries/Compression/Zipping_Files/VB6_Zip_Sample_Project.asp http://msdn2.microsoft.com/en-us/library/ms950396.aspx
or Again from Ron De Bruin |
For whoever is interested this can also be automated (not that you need to
because doing it manually is so simple)
'-----------------------------------------------------------------------------
Sub MakeDistrListFromExcelList()
'need reference to MS Outlook library
'Adds e-mail and display name to a distribution list. Format of e-mail
address (Col F)
'must be *** Name <e-mailaddress> *** for both e-mail address and display
name to
'get populated in the distribution list
Dim ol As New Outlook.Application
Dim olns As Outlook.Namespace
Dim fldContacts As Outlook.MAPIFolder
Dim itms As Outlook.Items
Dim cf As Object
Dim i As Variant
Dim myDistList As DistListItem
Dim myRecipients As Recipients
Dim myMailItem As MailItem
Set ol = CreateObject("Outlook.Application")
Set olns = ol.GetNamespace("MAPI")
' Which folder is the contacts list in?
Set fldContacts = olns.GetDefaultFolder(olFolderContacts)
Set itms = fldContacts.Items
Set myDistList = ol.CreateItem(olDistributionListItem)
myDistList.DLName = "Test Distribution List"
For Each i In [F8:F39]
Set cf = itms.Add("IPM.Contact")
cf.Email1Address = i.Value
Set myMailItem = ol.CreateItem(olMailItem)
Set myRecipients = myMailItem.Recipients
myRecipients.Add cf.Email1Address
myRecipients.ResolveAll
myDistList.AddMembers myRecipients
myDistList.Save
Next
myDistList.Display
End Sub
'-----------------------------------------------------------------------------
Thanks to George from Excel-L.
Include Email Signature from Outlook when Emailing via VBA
When I send an email via VBA code the resulting mail does not include any signature. I Need to include my standard signature. Any suggestions / solution?
See: http://www.rondebruin.nl/mail/folder3/signature.htm