Make changes in the outlook file save as type using C# RRS feed

  • Question

  • User444412299 posted
    How to make changes in the outlook file save as type in the save file dialog box using C#?
    Tuesday, June 4, 2019 1:18 PM

All replies

  • User753101303 posted


    Unclear. Keep in mind we have no other context than what you tell us.

    Do you try to change something (and what ?) in the "save as" dialog which is triggered when sending back a file to the browser ?

    Or do you mean you are trying to change something in a a dialog triggered from the Outlook desktop app ? (unrelated to ASP.NET maybe an Outlook Addin and once again knowing which "changes" you want to make could help to better understand what you are trying to do).

    Tuesday, June 4, 2019 1:31 PM
  • User61956409 posted

    Hi fytan88,

    Welcome to ASP.NET forums.

    How to make changes in the outlook file save as type in the save file dialog box using C#?

    Firstly, as PatriceSc suggested, please clarify more about your requirements and problems, so that we can understand it better.

    Besides, if you'd like to find and use .NET libraries to read and write MSG file, you can search about it using your favourite search engine to find some .NET libraries for reading/writing MSG file(s),

    I'm using following libraries:


    Example code:

    using (var msg = new MsgReader.Outlook.Storage.Message(@"C:\test.msg"))
        var from = msg.Sender;
        var sentOn = msg.SentOn;
        var recipientsTo = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.To, false, false);
        var recipientsCc = msg.GetEmailRecipients(MsgReader.Outlook.RecipientType.Cc, false, false);
        var subject = msg.Subject;
        var htmlBody = msg.BodyHtml;
        // etc...


    Example code:

    using (var email = new Email(new Sender("xxxx@xxx.com", "xxxx"),
        new Representing("xxxxx@xxx.com", "xxxxx"),
        "This is the subject"))
        email.Subject = "This is the subject";
        email.BodyText = "this is text";
        email.BodyHtml = "<html><head></head><body><b>Hello World</b></body></html>";

    With Regards,

    Fei Han

    Wednesday, June 5, 2019 2:28 AM