LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 10,593
Default Simple Print Macros

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
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Simple macros question Eric M. Excel Programming 4 April 7th 06 07:50 PM
simple i am hoping with macros chip_pyp Excel Discussion (Misc queries) 1 March 26th 06 04:14 PM
Macros in Excel(probably a simple solution) MrDarcy Excel Discussion (Misc queries) 2 December 14th 05 02:54 PM
Problems with simple print macros [email protected] Excel Programming 1 December 12th 05 05:56 PM
simple question about macros mati Excel Programming 3 April 22nd 05 01:43 PM


All times are GMT +1. The time now is 05:29 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"