![]() |
![]() | ![]() | ![]() | ![]() | ![]() | ![]() | ![]() |
| Welcome to Windows Vista Forums. Our forum is dedicated to helping you find solutions with any problems, errors or issues you are experiencing with Windows Vista. The Vista forum also covers news and updates and has an extensive Windows Vista tutorial section that covers a wide range of tips and tricks. |
| |||||||
![]() |
| |
| | #1 (permalink) |
| | How do IRead an Outlook Msg in vbScritp Hi, I want to look in my inbox and find mail from a specific sender and then do stuf with the message. So far I have this: Set objOL = WScript.CreateObject ("outlook.application") Set olNS = objOL.GetNameSpace("MAPI") Set fld = olNS.GetDefaultFolder(6) In fld I would expext to be able to select messages like this; For Each item In fld <---- Error happens here If item.SenderEmailAddress = "system.generated@xxxxxx" Then WScript.Echo item.body End If Next But i get this error: Microsoft VBScript runtime error: Object doesn't support this property or method What should I do here? OldDog |
My System Specs![]() |
| | #2 (permalink) |
| | Re: How do IRead an Outlook Msg in vbScritp On Nov 7, 1:01*pm, OldDog <mikef2...@xxxxxx> wrote: Quote: > Hi, > > I want to look in my inbox and find mail from a specific sender and > then do stuf with the message. > > So far I have this: > > Set objOL = WScript.CreateObject ("outlook.application") > Set olNS = objOL.GetNameSpace("MAPI") > Set fld = olNS.GetDefaultFolder(6) > > In fld I would expext to be able to select messages like this; > > *For Each item In fld * <---- Error happens here > > * * * * *If item.SenderEmailAddress = "system.genera...@xxxxxx" Then > * * * * * * * * WScript.Echo item.body > * * * * End If > Next > > But i get this error: > > Microsoft VBScript runtime error: Object doesn't support this property > or method > > What should I do here? > > OldDog Set objOL = WScript.CreateObject ("outlook.application") Set olNS = objOL.GetNameSpace("MAPI") Set fld = olNS.GetDefaultFolder(6) set msg = fld.items '<------ right here For Each item In msg If item.SenderEmailAddress = "system.genera...@xxxxxx" Then WScript.Echo item.body End If Next |
My System Specs![]() |
![]() |
| Thread Tools | |
| |
Similar Threads | ||||
| Thread | Forum | |||
Exporting Email accounts from Vista to Microsoft Outlook or Outlook Express | Microsoft Office | |||
| vbscritp Sql Impersonation | VB Script | |||
| Importing back-up Outlook Express file with emails to Outlook 2007 and/or Windows Live Mail | Vista mail | |||
| Transfert messages Outlook 2000 ou Outlook Express 6 vers Windows Mail | Vista mail | |||
| Easiest way to transfer outlook 2003 settings (XP) to Outlook 2007 onnew vista machine? | Vista General | |||