Home |
Search |
Today's Posts |
#4
![]()
Posted to microsoft.public.excel.programming
|
|||
|
|||
![]()
Sub GetEmails()
Const oFolderInbox As Long = 6 Dim oOL As Object Dim oNameSpace As Object 'Outlook.NameSpace Dim oInbox As Object 'Outlook.MAPIFolder Dim oItem As Object Set oOL = CreateObject("Outlook.Application") Set oNameSpace = oOL.GetNamespace("MAPI") Set oInbox = oNameSpace.GetDefaultFolder(oFolderInbox) 'Make Outlook visible oInbox.Display For Each oItem In oInbox.items oItem.PrintOut Next oItem End Sub -- HTH Bob Phillips (there's no email, no snail mail, but somewhere should be gmail in my addy) "Hank Youngerman" wrote in message ups.com... I would like to write a simple macro that would open and print all the emails in a folder. How do I write and execute it? Seems like it should be simple. I think it will be something like: Select folder For each mailitem in mailitem.open mailitem.print next mailitem But I don't know the exact syntax. Thanks in advance. |
Thread Tools | Search this Thread |
Display Modes | |
|
|
![]() |
||||
Thread | Forum | |||
Simple macros question | Excel Programming | |||
simple i am hoping with macros | Excel Discussion (Misc queries) | |||
Macros in Excel(probably a simple solution) | Excel Discussion (Misc queries) | |||
Problems with simple print macros | Excel Programming | |||
simple question about macros | Excel Programming |