Solved

Read Through Email Subject Line?

Posted on 2008-10-03
2
536 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

Free Tool: Postgres Monitoring System

A PHP and Perl based system to collect and display usage statistics from PostgreSQL databases.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Script to copy or move mouse-selected collection of files plus targets referenced by shortcuts (.lnk) The purpose of this article is to help illuminate the real challenges and options available (where they may exist) for utilizing simple scriptin…
This is pretty cool.  The purpose of this VB Script is to help you document where JAR (Java ARchive) files and specifically java class files are located so that you can address issues seen with a client or that you can speak intelligently with a dev…
A short tutorial showing how to set up an email signature in Outlook on the Web (previously known as OWA). For free email signatures designs, visit https://www.mail-signatures.com/articles/signature-templates/?sts=6651 If you want to manage em…
I've attached the XLSM Excel spreadsheet I used in the video and also text files containing the macros used below. https://filedb.experts-exchange.com/incoming/2017/03_w12/1151775/Permutations.txt https://filedb.experts-exchange.com/incoming/201…

685 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