.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?

It takes just 2 minutes to sign up (and it's free!). Just click the sign up button to choose a username and then you can ask your own questions on the forum.

Share This Page