Solved

Read Through Email Subject Line?

Posted on 2008-10-03
2
531 Views
Last Modified: 2012-05-07
I have this script that I received from an Expert here at EE.  It worked as I asked, but user needs some additional information.  In the snippet below, "Missing Transactions" is a folder that contains emails.  Would it be possible for me to diplay the Subject Line of the emails within that folder? (Missing Transactions)

Also, does anyone know of a good reference book for scripting in general?

Thanks
SnowLapa
Const olFolderInbox = 6

 

Set objOutlook = CreateObject("Outlook.Application")

Set objNamespace = objOutlook.GetNamespace("MAPI")

Set objFolder = objNamespace.GetDefaultFolder(olFolderInbox):Set objFolder= objFolder.Parent

Set flds = objFolder.folders

Set mpfSubFolder = flds.GetFirst

 

 

Do While Not mpfSubFolder Is Nothing

	If mpfSubFolder.Name = "IS Department" Then

		Set colItems = mpfSubFolder.folders

		For Each objItem in colItems

    		if objItem.name = "Missing Transactions" then

    			'DO WHATEVER

    		End If

		Next

    End If

    Set mpfSubFolder = flds.GetNext

Loop

Open in new window

0
Comment
Question by:SnowLapa
2 Comments
 
LVL 5

Accepted Solution

by:
lodar123 earned 125 total points
ID: 22638293
hey.. me again :)
try to modify that part of the script with this....
 

Set colItems = mpfSubFolder.folders

For Each objItem in colItems

	if objItem.name = "Missing Transactions" then

    		Set colItems2 = objItem.items

		For Each objItem2 in colItems2

    			if objItem2.Subject = "SUBJECT" then

    				'DO WHATEVER

			End If

		Next

	'DO WHATEVER

	end If

Next

Open in new window

0
 

Author Closing Comment

by:SnowLapa
ID: 31623588
Worked great.

Thanks
SnowLapa
0

Featured Post

What Should I Do With This Threat Intelligence?

Are you wondering if you actually need threat intelligence? The answer is yes. We explain the basics for creating useful threat intelligence.

Join & Write a Comment

Well hello again!  Glad to see you've made it this far without giving up.  In this, the fourth installment of my popular series, I'm going to cover functions and subroutines, what they are, and why they are useful.  Just in case you stumbled onto th…
If you need to start windows update installation remotely or as a scheduled task you will find this very helpful.
Access reports are powerful and flexible. Learn how to create a query and then a grouped report using the wizard. Modify the report design after the wizard is done to make it look better. There will be another video to explain how to put the final p…
In this tutorial you'll learn about bandwidth monitoring with flows and packet sniffing with our network monitoring solution PRTG Network Monitor (https://www.paessler.com/prtg). If you're interested in additional methods for monitoring bandwidt…

760 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

20 Experts available now in Live!

Get 1:1 Help Now