We value your feedback.
Take our survey and automatically be enter to win anyone of the following:
Yeti Cooler, Amazon eGift Card, and Movie eGift Card!
Sub JunkFile() Dim outputFile As Object Dim objFSO As Object Dim recip As Recipient Const strFileSpec As String = "c:\Deleteme\JunkMail.txt" If Application.ActiveExplorer.Selection.Count <> 1 Then Exit Sub MsgBox " I am inside the app " On Error Resume Next Set objFSO = CreateObject("scripting.filesystemobject") Set outputFile = objFSO.opentextfile(strFileSpec, 8) On Error GoTo 0 If outputFile Is Nothing Then Set outputFile = objFSO.createtextfile(strFileSpec, True) ' Set outputFile = objFSO.createtextfile(strFileSpec, True) For Each recip In Application.ActiveExplorer.Selection(1).Recipients If recip.Type = olTo Then outputFile.Writeline recip.Address End If Next outputFile.Writeline "End of file" & " " & Now() outputFile.Close Set outputFile = Nothing MsgBox "end of processing " End Sub
Add your voice to the tech community where 5M+ people just like you are talking about what matters.
|Can we sort draft email files in Drafts box based on creating time in Outlook2010?||4||26|
|Macro to automate attaching specific file to a new email||3||30|
|Email in Outlook sent items folder missing, but a "search" of all folders finds them (in the sent items folder). How can that be?||5||23|
|Certificates for Exchange 2010||4||17|