I would like to modify the code that is in the code section. The details are given before the procedure. Thank u
The following code works. What I would like to change is instead of
the recip.type = olCC or recip.Type = olBCC
I would like the recip Type to - the Sender of the email.
What is the correct syntax to substitute for this;
and also where else the changes should take place.
Dim outputFile As Object
Dim objFSO As Object
Dim recip As Recipient
Const strFileSpec As String = "c:\Deleteme\CCorBCC.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 = olCC Or recip.Type = olBCC Or recip.Type = olTo Then
outputFile.Writeline "End of file" & " " & Now()
Set outputFile = Nothing
MsgBox "end of processing "