Question:

VB Outlook

by  |  earlier

0 LIKES UnLike

I am saving an email from Outlook to my hard drive. The format in which I save this mail is: Date,Time,Sender to Receiver,Subject.msg. My problem is that when the email was sent to for example 50 people, then the string that I create for the file-name is too short and all the email adresses are not listed. At this moment my code looks lik this:

Set SubFolder = myOlApp.Session.GetFolderFromID(EntryID(I), StoreID(I)) On Error Resume Next For j = 1 To SubFolder.Items.Count Set mItem = SubFolder.Items(j) StrReceived = ArrangedDate(mItem.ReceivedTime) StrSender = mItem.senderName strReceiver = mItem.To StrSubject = mItem.subject strName = StripIllegalChar(StrSubject) StrFile = StrSaveFolder & StrReceived & "_" & StrSender & " to " & strReceiver & "_" & strName & ".msg" StrFile = Left(StrFile, 256) mItem.SaveAs StrFile, 3 Next j On Error GoTo 0 Next I ExitSub:

It is the 256 that gives me problems, I do not know how to make the string longer

 Tags:

   Report
Please Login to view 1 answers to this question
You're reading: VB Outlook

Question Stats

Latest activity: earlier.
This question has 1 answers.

BECOME A GUIDE

Share your knowledge and help people by answering questions.