Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook from Excel

I remember seeing the code for this before, but i can't seem to find it
any suggestions would be great.
I need to pull all emails that contain a certain word or from a certai
folder and put them onto a spreadsheet.
should be pretty simple for you smart guys, but i have no idea where t
begin.
thanks

--
Message posted from http://www.ExcelForum.com

  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 30
Default Outlook from Excel

http://www.rondebruin.nl/


  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 599
Default Outlook from Excel

Scott

http://www.dicks-clicks.com/excel/olRetrieving.htm

--
Dick Kusleika
MVP - Excel
Excel Blog - Daily Dose of Excel
www.dicks-blog.com

"scottnshelly " wrote in
message ...
I remember seeing the code for this before, but i can't seem to find it.
any suggestions would be great.
I need to pull all emails that contain a certain word or from a certain
folder and put them onto a spreadsheet.
should be pretty simple for you smart guys, but i have no idea where to
begin.
thanks.


---
Message posted from http://www.ExcelForum.com/



  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook from Excel

Is it possible to retrieve all e-mails from a folder rather than al
e-mails that contain a word

--
Message posted from http://www.ExcelForum.com

  #5   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 860
Default Outlook from Excel

Hi Scott,

Is it possible to retrieve all e-mails from a folder rather than all
e-mails that contain a word?


Yes. Here's some modified code that list the subject, from name, and
received time of all emails in a folder named "test":

Sub GetFromInbox()

Dim olApp As Outlook.Application
Dim olNs As NameSpace
Dim Fldr As MAPIFolder
Dim olMail As Outlook.MailItem
Dim i As Integer

Set olApp = New Outlook.Application
Set olNs = olApp.GetNamespace("MAPI")
Set Fldr = olNs.GetDefaultFolder(olFolderInbox).Folders("test ")

For Each olMail In Fldr.Items
i = i + 1
ActiveSheet.Cells(i, 1).Value = olMail.Subject
ActiveSheet.Cells(i, 2).Value = olMail.SenderName
ActiveSheet.Cells(i, 3).Value = olMail.ReceivedTime
Next olMail

Set Fldr = Nothing
Set olNs = Nothing
Set olApp = Nothing

End Sub

--
Regards,

Jake Marx
MS MVP - Excel
www.longhead.com

[please keep replies in the newsgroup - email address unmonitored]



  #6   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 1
Default Outlook from Excel

Thanks,
Now i have this code that pulls all the e-mails from a folder name
'terms' and puts them into different cells in the same column the
prints. the problem is, i only need one four-digit number from eac
cell. so i end up printing way too many pages than neccessary. is i
possible to only print the four-digit number from each e-mail/cell?
Thanks

--
Message posted from http://www.ExcelForum.com

Reply
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
custimized outlook today in outlook 2007 Hal Excel Discussion (Misc queries) 2 June 20th 07 12:59 AM
excel open in outlook if outlook is running kirk Excel Discussion (Misc queries) 0 May 24th 06 06:42 PM
Send to Outlook 2000 not Outlook Express Jimbo Excel Discussion (Misc queries) 2 January 4th 05 08:19 PM
Outlook 2003 demo back to Outlook XP Pete Carr Excel Discussion (Misc queries) 1 December 22nd 04 08:04 AM
Display mail application either in Outlook, or Outlook express [email protected] Excel Programming 0 April 13th 04 09:50 PM


All times are GMT +1. The time now is 08:45 AM.

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

About Us

"It's about Microsoft Excel"