Created
August 21, 2018 19:51
-
-
Save guinslym/298a329d77d9fb8552aa012c242bf70b to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sub Retrieve_http() | |
'our Outlook folder- deifinitions | |
Dim myItem As MailItem | |
Dim myFolder As Folder | |
Dim myNamespace As NameSpace | |
Set myNamespace = Application.GetNamespace("MAPI") | |
'put your folders name here | |
'1st one is store folder which should refer to firewall_support@iuass.org | |
'second is possibly 'inbox folder' | |
Set myFolder = myNamespace.folders("firewall_support@iuass.org").folders("inbox") | |
'destination file | |
Dim resFile As String | |
resFile = "c:\Users\Kazik\Desktop\httpRequest.txt" | |
Dim ff As Byte | |
ff = FreeFile() | |
'creating or opening it- each time you run this macro we will append data | |
'until deletion of either file or its content | |
Open resFile For Append As #ff | |
For Each myItem In myFolder.items | |
If InStr(1, myItem.Subject, "http://") > 0 And _ | |
InStr(1, myItem.Subject, "classified under:") > 0 Then | |
'write to file | |
Write #ff, myItem.Subject | |
End If | |
Next | |
Close #ff | |
End Sub |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment