A Microsoft Outlook email forum. Outlook Banter

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » Outlook Banter forum » Microsoft Outlook Email Newsgroups » Outlook and VBA
Site Map Home Register Authors List Search Today's Posts Mark Forums Read Web Partners

select ALL option



 
 
Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1  
Old September 22nd 08, 02:50 PM posted to microsoft.public.outlook.program_vba
Ranjit kurian
external usenet poster
 
Posts: 2
Default select ALL option

I have written the macro code in excel, and from excel macro iam able to
DISPLAY the mail based on subject provided, now i need a macro code to copy
the body of displayed mail and paste it to a new excel workbook.

Here is my code....

Private strForwardTo As String

Sub subject_beginswith()

Dim ns As Namespace
Dim Inbox As MAPIFolder
Dim myitem As Outlook.MailItem
Dim Atmt As Attachment
Dim FileName As String
Dim i As Integer
Dim objSearchFolder As Outlook.MAPIFolder
Dim Recipient As Outlook.Recipient
Dim CorrRecip As String
Dim item As Object
Dim Body

Dim mai As MailItem


Set ns = GetNamespace("MAPI")
Set Inbox = ns.GetDefaultFolder(olFolderInbox)
Set objSearchFolder = Inbox
i = 0

If Inbox.Items.Count = 0 Then
MsgBox "Inbox is Empty", vbInformation, "Nothing Found"
End If

For Each item In Inbox.Items
If Format(item.ReceivedTime, "DD/MM/YY") Format(Date, "DD/MM/YY") Then
GoTo nextme
If item.Subject Like "Reminder to complete the 2008 Thomson Reuters
Employee*" Then
item.Display
' Workbooks.Add
'ActiveSheet.Paste
SendKeys "(^A)"

Exit Sub
End If
nextme:
Next

End Sub




 




Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
Has the "Select Names: My Contacts" option been updated for '07? [email protected] Outlook - Using Contacts 3 November 28th 07 10:00 PM
Select item j Add-ins for Outlook 4 February 21st 07 07:49 PM
How do I vote on a blackberry (select approve/reject option)? voter Outlook - Using Forms 0 October 18th 06 09:27 PM
Make select all and block sender a quick and easy option in Junk Bill Outlook and VBA 0 July 31st 06 03:12 PM
No option to select ACT address book. MelissaKinVA Outlook - Installation 1 March 8th 06 05:27 PM


All times are GMT +1. The time now is 03:58 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.Search Engine Friendly URLs by vBSEO 2.4.0
Copyright ©2004-2025 Outlook Banter.
The comments are property of their posters.