Macro to send Outlook folder

M

Mike Miller

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
 
S

Sue Mosher [MVP-Outlook]

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.
 
M

Michael Bauer

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.
 
M

Mike Miller

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
 
M

Mike Miller

Could you provide me some sample code on how to do that, or point me to a
site with such a 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