Macro to send Outlook folder

  • Thread starter Thread starter Guest
  • Start date Start date
G

Guest

I have a macro (see below) I use in Outlook 2003 to automatically send some
external files via email, and it works fine. Is there a way to use a
similiar macro to send a specific Outlook folder, such as the Calendar folder?

Sub SendFiles()
Dim myItem As Outlook.MailItem
Dim myAttachments As Outlook.Attachments

Set myItem = Application.CreateItem(olMailItem)
Set myAttachments = myItem.Attachments

myItem.Recipients.Add "<email address>"
myItem.Subject = "Files"

myAttachments.Add "<path and filename, repeated for each file>"

myItem.Send

Set myItem = Nothing
Set myAttachments = Nothing

End Sub
 
No, that's not possible with a macro. You could, however, save all the items in the folder as .msg files and attach them to a message.
 
Hi Mike,

a folder isn´t a file that you could send. Instead you´d need to send
each object of the folder´s items collection.
 
Michael,

Is there a way to grab all of the appointments/events in the Calendar
Folder, or optionally select only those after a specified date?

Mike
 
Could you provide me some sample code on how to do that, or point me to a
site with such a sample?
 
Back
Top