Help required to modify the vb script

Status
Not open for further replies.
Joined
Sep 26, 2012
Messages
6
Reaction score
0
I need to extract all outlook mails to single text file. I have a code for it ,but it extracts each mail to separate text file. But i need all in single text file. Please its very urgent
The present code is given below.

Sub saveEmailTxt()
Dim objItem As Object
Dim iCount As Integer

'iterate over all Items in the current folder and save the body as textfile in c:\ '
For Each objItem In ActiveExplorer.CurrentFolder.Items
objItem.SaveAs "C:\Mail" & CStr(iCount) & ".txt", olSaveAsText
iCount = iCount + 1
Next

End Sub
 
Status
Not open for further replies.

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Top