![]() |
|
|||||||
|
|
|
Thread Tools | Display Modes |
|
|
|
#1
|
|||
|
|||
|
I have approx. 120 pages in my Inbox with 33 email messages on each page making 3960 and a similar number in the Sent Box. Some 8000 items in all. I need to create one continuous list of these ( separate from Outlook)to use as an INDEX with the full text of sample messages behind it, as part of an document substantiating the communications.
I can easily copy or print the email message itself, but it is the Index I need to produce so as to show the full extent of the communication. I tried to do the Index list using Snipping Tool and cut and paste into a Word document but I find each Outlook page needs 3 snipps and 5 -7 steps to cut and paste to fit the whole job would take a year. Is there any way I can tabulate into pages that can be copied and arranged more efficiently to produce the Index ?? |
|
#2
|
||||
|
||||
|
I think the following Outlook macro may help, but if you require the message bodies that would produce a humungous document with thousands of records.
Code:
Option Explicit
Sub ListMessages()
Dim wdApp As Object
Dim wdDoc As Object
Dim oTable As Object
Dim bStarted As Boolean
Dim oRng As Object
Dim olFolder As Folder
Dim olItem As MailItem
Set olFolder = Application.Session.PickFolder
On Error Resume Next
Set wdApp = GetObject(, "Word.Application")
If Err Then
Set wdApp = CreateObject("Word.Application")
bStarted = True
End If
On Error GoTo err_Handler
Set wdDoc = wdApp.Documents.Add
Set oTable = wdDoc.Tables.Add(wdDoc.Range, 1, 2)
Set oRng = oTable.Rows.Last.Cells(1).Range
oRng.End = oRng.End - 1
oRng.Text = "Message"
Set oRng = oTable.Rows.Last.Cells(2).Range
oRng.End = oRng.End - 1
oRng.Text = "Date"
wdApp.Visible = True
wdApp.Activate
Set oRng = wdDoc.Range
For Each olItem In olFolder.Items
oTable.Rows.Add
Set oRng = oTable.Rows.Last.Cells(1).Range
oRng.End = oRng.End - 1
oRng.Text = olItem.Subject
Set oRng = oTable.Rows.Last.Cells(2).Range
oRng.End = oRng.End - 1
oRng.Text = Format(olItem.ReceivedTime, "dd/mm/yyyy")
Next olItem
lbl_Exit:
If bStarted = True Then
wdApp.Quit
End If
Set wdDoc = Nothing
Set wdApp = Nothing
Exit Sub
err_Handler:
MsgBox Err.Number & vbCr & Err.Description
Err.Clear
GoTo lbl_Exit
End Sub
__________________
Graham Mayor - MS MVP (Word) (2002-2019) Visit my web site for more programming tips and ready made processes www.gmayor.com |
|
#3
|
|||
|
|||
|
Graham Hi,
Thank you so much for your reply. I certainly do not need the body of the message, a few samples will suffice. It is the INDEX to establish the extent of the communication over 3 years that I am seeking to reproduce only the lists that appear in the Inbox and the Sent Box. Mate, I am truly grateful for your advice but I regret the "code" is beyond me. Tell me do I need a programmer or other professional to translate it and/or put it into effect. What skill specifically am I looking for ?? Cheers, Alan |
|
| Thread Tools | |
| Display Modes | |
|
|
Similar Threads
|
||||
| Thread | Thread Starter | Forum | Replies | Last Post |
| Outlook 2007 IMAP "Inbox" not receiving new emails. | gcnivas | Outlook | 0 | 05-26-2015 02:07 PM |
How to choose a "List" for certain "Heading" from "Modify" tool?
|
Jamal NUMAN | Word | 2 | 07-03-2011 03:11 AM |
| direct incoming email to "outlook" folder inbox | John Ames | Outlook | 8 | 06-25-2011 02:51 PM |
| outlook "Unread Email" folder automaticaly reads then dissapears emails | michaelrj9 | Office | 0 | 08-20-2010 03:59 PM |
| Outlook Today's "Inbox" and Showing New Mail for E | my02wg | Outlook | 0 | 03-19-2006 06:36 AM |