.CreateItemFromTemplate

Discussion in 'Microsoft VB .NET' started by Dean, Oct 29, 2004.

  1. Dean

    Dean Guest

    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)
     
    Dean, Oct 29, 2004
    #1
    1. Advertisements

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 (here). After that, you can post your question and our members will help you out.