<?xml version="1.0" encoding="UTF-8" ?>
<?xml-stylesheet type="text/xsl" href="http://msmvps.com/utility/FeedStylesheets/rss.xsl" media="screen"?><rss version="2.0" xmlns:dc="http://purl.org/dc/elements/1.1/" xmlns:slash="http://purl.org/rss/1.0/modules/slash/" xmlns:wfw="http://wellformedweb.org/CommentAPI/"><channel><title>Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx</link><description>Sometimes you want to send some important notice to everyone who has ever mailed you. Let&amp;#39;s say you have a folder named &amp;quot;Friends&amp;quot; in Outlook where you store all the emails from your friends. Now you want to get all of their email addresses</description><dc:language>en</dc:language><generator>CommunityServer 2008.5 SP2 (Build: 40407.4157)</generator><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1710660</link><pubDate>Wed, 29 Jul 2009 03:52:01 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1710660</guid><dc:creator>Andreas</dc:creator><description>&lt;p&gt;Hello guys, can you modify Jakobs version for me so I can get all email addresses within the email bodies instead of the the &amp;quot;From&amp;quot; field in a selected folder?&lt;/p&gt;
&lt;p&gt;I have saved all bounced back emails in a separate folder and want to get now the email addresses that bounced back to clean the OK list.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1710660" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1697500</link><pubDate>Wed, 01 Jul 2009 17:22:52 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1697500</guid><dc:creator>Prasad</dc:creator><description>&lt;p&gt;Really helpful to get email ids from my outlook out of hundreds of emails that I receive everyday.&lt;/p&gt;
&lt;p&gt;Thanks&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1697500" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1694535</link><pubDate>Mon, 08 Jun 2009 10:19:56 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1694535</guid><dc:creator>Jobe</dc:creator><description>&lt;p&gt;Jakob&amp;#39;s simple version worked perfectly for me in outlook 2007. all other versions with the dictionary object displayed an error. Now to try to get 400 emails into csv format...&lt;/p&gt;
&lt;p&gt;THANKS!&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1694535" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1692242</link><pubDate>Tue, 12 May 2009 14:05:32 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1692242</guid><dc:creator>Ge</dc:creator><description>&lt;p&gt;Please help, it won&amp;#39;t work for me. I have outlook 03 and have tried every code to no avail&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1692242" width="1" height="1"&gt;</description></item><item><title>Got email address of all users from all mails in Outlook Folder!</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1671289</link><pubDate>Tue, 10 Feb 2009 18:45:57 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1671289</guid><dc:creator>captain-mruphy</dc:creator><description>&lt;p&gt;Okay guys, I worked on this for a little while and it finnaly works, abate messyness. I found a module to print this to a text file and two moduels for the recursive function: one takes names, e-mail, and subject from each e-mail and makes a list that is pastable into excel. The other makes a list of every e-mail with no duplicates. &amp;nbsp;Choose the one you want call.&lt;/p&gt;
&lt;p&gt;&amp;#39;This is the main Sub, It picks the folder and calls the functions to recurse and save&lt;/p&gt;
&lt;p&gt;Sub GetALLEmailAddresses()&lt;/p&gt;
&lt;p&gt;Dim objFolder1 As MAPIFolder&lt;/p&gt;
&lt;p&gt;Dim strEmail1 As String&lt;/p&gt;
&lt;p&gt;Dim strEmails1 As String&lt;/p&gt;
&lt;p&gt;Dim objItem As Object&lt;/p&gt;
&lt;p&gt;Dim writeText As Boolean&lt;/p&gt;
&lt;p&gt;Set objFolder1 = Application.GetNamespace(&amp;quot;Mapi&amp;quot;).PickFolder&lt;/p&gt;
&lt;p&gt;strEmails1 = GetMessages(objFolder1, True)&lt;/p&gt;
&lt;p&gt;&amp;#39;strEmails1 = GetMessageEmails(objFolder1, True) &amp;nbsp;&lt;/p&gt;
&lt;p&gt;Debug.Print strEmails1&lt;/p&gt;
&lt;p&gt;writeText = SaveTextToFile(&amp;quot;C:\file.txt&amp;quot;, strEmails1, True)&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;p&gt;&amp;#39;this is verbatem from &lt;a rel="nofollow" target="_new" href="http://www.freevbcode.com/ShowCode.Asp?ID=733"&gt;www.freevbcode.com/ShowCode.Asp&lt;/a&gt;, it saves the files to a text file&lt;/p&gt;
&lt;p&gt;Public Function SaveTextToFile(FileFullPath As String, _&lt;/p&gt;
&lt;p&gt; sText As String, Optional Overwrite As Boolean = False) As _&lt;/p&gt;
&lt;p&gt; Boolean&lt;/p&gt;
&lt;p&gt;&amp;#39;Purpose: Save Text to a file&lt;/p&gt;
&lt;p&gt;&amp;#39;Parameters:&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;-- FileFullPath - Directory/FileName to save file to&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;-- sText - Text to write to file&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;-- Overwrite (optional): If true, if the file exists, it&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;is overwritten. &amp;nbsp;If false,&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;#39;contents are appended to file&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;&amp;#39;if the file exists&lt;/p&gt;
&lt;p&gt;&amp;#39;Returns: &amp;nbsp; True if successful, false otherwise&lt;/p&gt;
&lt;p&gt;&amp;#39;Example:&lt;/p&gt;
&lt;p&gt;&amp;#39;SaveTextToFile &amp;quot;C:\My Documents\MyFile.txt&amp;quot;, &amp;quot;Hello There&amp;quot;&lt;/p&gt;
&lt;p&gt;On Error GoTo ErrorHandler&lt;/p&gt;
&lt;p&gt;Dim iFileNumber As Integer&lt;/p&gt;
&lt;p&gt;iFileNumber = FreeFile&lt;/p&gt;
&lt;p&gt;If Overwrite Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Open FileFullPath For Output As #iFileNumber&lt;/p&gt;
&lt;p&gt;Else&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;Open FileFullPath For Append As #iFileNumber&lt;/p&gt;
&lt;p&gt;End If&lt;/p&gt;
&lt;p&gt;Print #iFileNumber, sText&lt;/p&gt;
&lt;p&gt;SaveTextToFile = True&lt;/p&gt;
&lt;p&gt;ErrorHandler:&lt;/p&gt;
&lt;p&gt;Close #iFileNumber&lt;/p&gt;
&lt;p&gt;End Function&lt;/p&gt;
&lt;p&gt;&amp;#39;This is the GetMessages that takes a folder and returns a list of the &amp;quot;name, e=mail, subject&amp;quot;s &lt;/p&gt;
&lt;p&gt;Public Function GetMessages(oFolder As MAPIFolder, ByVal bRecursive As Boolean) As String&lt;/p&gt;
&lt;p&gt; Dim objFolder As Outlook.MAPIFolder&lt;/p&gt;
&lt;p&gt; Dim strEmail As String&lt;/p&gt;
&lt;p&gt; Dim strEmails As String&lt;/p&gt;
&lt;p&gt; Dim strName As String&lt;/p&gt;
&lt;p&gt; Dim strSubject As String&lt;/p&gt;
&lt;p&gt; Dim strAll As String&lt;/p&gt;
&lt;p&gt; Dim strItemAll As String&lt;/p&gt;
&lt;p&gt; Dim objItem As Object&lt;/p&gt;
&lt;p&gt; Dim objFolders As Outlook.Folders&lt;/p&gt;
&lt;p&gt; Set objFolders = oFolder.Folders&lt;/p&gt;
&lt;p&gt; For Each objFolder In objFolders&lt;/p&gt;
&lt;p&gt; &amp;nbsp;For Each objItem In objFolder.Items&lt;/p&gt;
&lt;p&gt; &amp;nbsp; If objItem.Class = olMail Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strEmail = objItem.SenderEmailAddress&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strName = objItem.SenderName&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strSubject = objItem.Subject&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strItemAll = strName + &amp;quot;,&amp;quot; + strEmail + &amp;quot;,&amp;quot; + strSubject&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;&amp;#39;If InStr(strEmails, strEmail) = 0 Then strEmails = strEmails + strEmail + &amp;quot;;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strAll = strAll &amp;amp; Chr$(13) &amp;amp; strItemAll&lt;/p&gt;
&lt;p&gt; &amp;nbsp; End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Next&lt;/p&gt;
&lt;p&gt; &amp;nbsp;If bRecursive Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#39; Might want to compare this to strEmails instead of just appending.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; strAll = strAll + GetMessages(objFolder, bRecursive)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; Next&lt;/p&gt;
&lt;p&gt; GetMessages = strAll&lt;/p&gt;
&lt;p&gt;End Function&lt;/p&gt;
&lt;p&gt;&amp;#39;This is the the function that returns a list of &amp;quot;;&amp;quot; delimited e-mails with no duplicates.&lt;/p&gt;
&lt;p&gt;Public Function getMessageEmails(oFolder As MAPIFolder, ByVal bRecursive As Boolean) As String&lt;/p&gt;
&lt;p&gt; Dim objFolder As Outlook.MAPIFolder&lt;/p&gt;
&lt;p&gt; Dim strEmail As String&lt;/p&gt;
&lt;p&gt; Dim strEmails As String&lt;/p&gt;
&lt;p&gt; Dim objItem As Object&lt;/p&gt;
&lt;p&gt; Dim objFolders As Outlook.Folders&lt;/p&gt;
&lt;p&gt; Set objFolders = oFolder.Folders&lt;/p&gt;
&lt;p&gt; For Each objFolder In objFolders&lt;/p&gt;
&lt;p&gt; &amp;nbsp;For Each objItem In objFolder.Items&lt;/p&gt;
&lt;p&gt; &amp;nbsp; If objItem.Class = olMail Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;strEmail = objItem.SenderEmailAddress&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp;If InStr(strEmails, strEmail) = 0 Then strEmails = strEmails + strEmail + &amp;quot;;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; End If&lt;/p&gt;
&lt;p&gt; &amp;nbsp;Next&lt;/p&gt;
&lt;p&gt; &amp;nbsp;If bRecursive Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;#39; Might want to compare this to strEmails instead of just appending.&lt;/p&gt;
&lt;p&gt; &amp;nbsp; strEmails = strEmails + getMessageEmails(objFolder, bRecursive)&lt;/p&gt;
&lt;p&gt; &amp;nbsp;End If&lt;/p&gt;
&lt;p&gt; Next&lt;/p&gt;
&lt;p&gt; getMessageEmails = strEmails&lt;/p&gt;
&lt;p&gt;End Function&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1671289" width="1" height="1"&gt;</description></item><item><title>re: Get ALL email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1669633</link><pubDate>Fri, 06 Feb 2009 21:48:15 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1669633</guid><dc:creator>captain-mruphy</dc:creator><description>&lt;p&gt;This code is so close to exactly what I needed &amp;nbsp;and I thank you guys a lot for putting it together. &amp;nbsp;&lt;/p&gt;
&lt;p&gt;However I was wondering if someone could write a few lines into it that would let you select the top folder, and have it recurse down through ever folder nested under that.&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1669633" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1667654</link><pubDate>Sun, 01 Feb 2009 00:17:21 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1667654</guid><dc:creator>Colin Charles</dc:creator><description>&lt;p&gt;How do I change the script to get all the email addresses for the recepients of all the emails I have sent?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1667654" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1660096</link><pubDate>Fri, 09 Jan 2009 23:05:14 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1660096</guid><dc:creator>christopher</dc:creator><description>&lt;p&gt;hey the last script from Jacob worked for me great-&lt;/p&gt;
&lt;p&gt;how would I change this to grab the CC: addresses as well as the sender addresses??&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1660096" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1659867</link><pubDate>Fri, 09 Jan 2009 09:48:31 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1659867</guid><dc:creator>Jakob H. Heidelberg</dc:creator><description>&lt;p&gt;Hi, try this code instead (simple version, without the dictionary object)&lt;/p&gt;
&lt;p&gt;Sub GetALLEmailAddresses()&lt;/p&gt;
&lt;p&gt;Dim objFolder As MAPIFolder&lt;/p&gt;
&lt;p&gt;Dim strEmail As String&lt;/p&gt;
&lt;p&gt;Dim strEmails As String&lt;/p&gt;
&lt;p&gt;Dim objItem As Object&lt;/p&gt;
&lt;p&gt;&amp;#39;&amp;#39;Set objFolder = Application.ActiveExplorer.Selection&lt;/p&gt;
&lt;p&gt;Set objFolder = Application.GetNamespace(&amp;quot;Mapi&amp;quot;).PickFolder&lt;/p&gt;
&lt;p&gt;For Each objItem In objFolder.Items&lt;/p&gt;
&lt;p&gt; &amp;nbsp; If objItem.Class = olMail Then&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; strEmail = objItem.SenderEmailAddress&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If InStr(strEmails, strEmail) = 0 Then strEmails = strEmails + strEmail + &amp;quot;;&amp;quot;&lt;/p&gt;
&lt;p&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; End If&lt;/p&gt;
&lt;p&gt;Next&lt;/p&gt;
&lt;p&gt;Debug.Print strEmails&lt;/p&gt;
&lt;p&gt;End Sub&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1659867" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#1658813</link><pubDate>Wed, 07 Jan 2009 19:09:30 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:1658813</guid><dc:creator>Mera Hola</dc:creator><description>&lt;p&gt;This does not work in Outlook 2007. Do you have an updated code for it?&lt;/p&gt;
&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=1658813" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#108060</link><pubDate>Fri, 18 Aug 2006 18:08:12 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:108060</guid><dc:creator>Dinesh Dhamija</dc:creator><description>First of all, I like your blogs.
&lt;br&gt;Secondly, The code you gave did not work for me, So I chnaged the code a little to make it work.
&lt;br&gt;
&lt;br&gt;Here is the updated code.
&lt;br&gt;
&lt;br&gt;Sub GetALLEmailAddresses()
&lt;br&gt;    Dim objExplorer As Explorer
&lt;br&gt;    Set objExplorer = Application.ActiveExplorer()
&lt;br&gt;    
&lt;br&gt;    Dim objFolder As MAPIFolder
&lt;br&gt;    Set objFolder = objExplorer.CurrentFolder
&lt;br&gt;    
&lt;br&gt;    Dim dic As New Dictionary
&lt;br&gt;    Dim strEmail As String
&lt;br&gt;    Dim strEmails As String
&lt;br&gt;    Dim objItem As MailItem
&lt;br&gt;    
&lt;br&gt;    For Each objItem In objFolder.Items
&lt;br&gt;        strEmail = objItem.SenderEmailAddress
&lt;br&gt;        
&lt;br&gt;        If Not dic.Exists(strEmail) Then
&lt;br&gt;            strEmails = strEmails + strEmail + ";"
&lt;br&gt;            dic.Add strEmail, ""
&lt;br&gt;        End If
&lt;br&gt;    Next
&lt;br&gt;    
&lt;br&gt;    Debug.Print strEmails
&lt;br&gt;
&lt;br&gt;End Sub
&lt;br&gt;
&lt;br&gt;
&lt;br&gt;&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=108060" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#108001</link><pubDate>Fri, 18 Aug 2006 03:47:24 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:108001</guid><dc:creator>omar</dc:creator><description>Which line throws the error?&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=108001" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#107181</link><pubDate>Wed, 09 Aug 2006 20:16:17 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:107181</guid><dc:creator>JJ</dc:creator><description>Hey what do I need installed for the script to run? I'm getting a 'user-defined type not defined' compile error on the Folder type. &amp;nbsp;I have the Office 2003 Resource Kit and .NET Programmability Support / VB Scripting Support features installed for Outlook.&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=107181" width="1" height="1"&gt;</description></item><item><title>re: Get email address of all users from all mails in Outlook Folder</title><link>http://msmvps.com/blogs/omar/archive/2006/08/09/get-email-address-of-all-users-from-all-mails-in-outlook-folder.aspx#107127</link><pubDate>Wed, 09 Aug 2006 14:44:37 GMT</pubDate><guid isPermaLink="false">d67277c4-116b-43f1-b688-e9ef184ea916:107127</guid><dc:creator>Robert</dc:creator><description>More better...&lt;br&gt;&lt;br&gt;Sub GetALLEmailAddresses()&lt;br&gt;&lt;br&gt;Dim objFolder As MAPIFolder&lt;br&gt;Dim strEmail As String&lt;br&gt;Dim strEmails As String&lt;br&gt;''' Requires reference to Microsoft Scripting Runtime&lt;br&gt;Dim dic As New Dictionary&lt;br&gt;Dim objItem As Object&lt;br&gt;&lt;br&gt;''Set objFolder = Application.ActiveExplorer.Selection&lt;br&gt;Set objFolder = Application.GetNamespace(&amp;quot;Mapi&amp;quot;).PickFolder&lt;br&gt;&lt;br&gt;For Each objItem In objFolder.Items&lt;br&gt; &amp;nbsp; &amp;nbsp;&lt;br&gt; &amp;nbsp; &amp;nbsp;If objItem.Class = olMail Then&lt;br&gt; &amp;nbsp; &amp;nbsp;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strEmail = objItem.SenderEmailAddress&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;If Not dic.Exists(strEmail) Then&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;strEmails = strEmails + strEmail + &amp;quot;;&amp;quot;&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;dic.Add strEmail, &amp;quot;&amp;quot;&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp; &amp;nbsp; &amp;nbsp;End If&lt;br&gt;&lt;br&gt; &amp;nbsp; &amp;nbsp;End If&lt;br&gt; &amp;nbsp; &amp;nbsp;&lt;br&gt;Next&lt;br&gt;&lt;br&gt;Debug.Print strEmails&lt;br&gt;&lt;br&gt;End Sub&lt;div style="clear:both;"&gt;&lt;/div&gt;&lt;img src="http://msmvps.com/aggbug.aspx?PostID=107127" width="1" height="1"&gt;</description></item></channel></rss>