Odd behavior when moving email messages in Windows 2K

D

Doug

This one has got me puzzled. I'm working on an app that
will import a given collection of Outlook MSG files into an
Outlook PST file. What I do is use the
..CreateItemFromTemplate method to bring the MSG file into
Outlook as a MailItem. I then move the MailItem to my PST
folder. What I'm seeing happening is the body field
completely disappearing when the item is moved.
It's there when the message first comes in, but as soon as
the mailitem is moved...no body field. The process works
just fine on a NT 4.0 station..I'm only seeing this happen
on Windows 2K.

Here's the code I use to load the file and move it to the
appropriate folder:
objNameSpace.AddStore (sTempPST)

For Each objFolder In objNameSpace.Folders
If objFolder.Name = "Personal Folders" Then
If objFolder.EntryID <> sSkipFolder Then
bError = False
Set objNewBox = objFolder.Folders("Messages")
If bError Then
Set objNewBox =
objFolder.Folders.Add("Messages")
End If
Exit For
End If
End If
Next objFolder

'Create an email message from the MSG file and move it to
the new folder
Set objMail = objOutlook.CreateItemFromTemplate(sFileName,
objNewBox)
objMail.Save
objMail.Move objNewBox

Any insight or ideas on how to correct this would be much
appreciated.
 

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