Aspose.Email.Examples.CSharp.Email.Outlook.SaveMsgAsTemplate.Run C# (CSharp) Метод

Run() статический приватный Метод

static private Run ( ) : void
Результат void
        static void Run()
        {
            // ExStart: SaveMsgAsTemplate
            ///<summary>
            /// This example shows how to save an Outlook MSG file to Outlook Template  using the MapiMessage API
            /// Available from Aspose.Email for .NET 6.4.0 onwards
            /// MapiMessage.SaveAsTemplate(Stream stream) - Saves to the specified stream as Outlook File Template(OFT format).
            /// MapiMessage.SaveAsTemplate(string fileName) - Saves to the specified file as Outlook File Template(OFT format).
            ///</summary>
            using (MapiMessage mapi = new MapiMessage("[email protected]", "[email protected]", "template subject", "Template body"))
            {
                string oftMapiFileName = "mapiToOft.msg";
                mapi.SaveAsTemplate(oftMapiFileName);
            }            
            // ExEnd: SaveMsgAsTemplate
        }
    }
SaveMsgAsTemplate