I've written a service that intercepts writes of .MSG (Outlook format)
using the FileSystemWatcher component. Everything works fine if the
..MSG files are in MailItem format, however if the .MSG file is
PostItem format it hangs the .CreateItemFromTemplate Method.
Any suggestions are welcome.
CODE:
'Prepare the Outlook Object
OL = New Outlook.Application
olNameSpace = OL.GetNamespace("MAPI")
olNameSpace.GetDefaultFolder(Outlook.OlDefaultFolders.olFolderInbox)
olNameSpace.Logon("", "", False, False)
'Open the .MSG file
Msg = OL.CreateItemFromTemplate(sFilename)
|