![]() We can get the text and RTF bodies of the message by using properties of the MapiMessage class. The following code snippet shows you how to gett the From, To, Cc and Subject from an MSG File. Following is the sample code for getting these properties. The MapiMessage class exposes properties and collections for getting the subject, from, to, and cc information. Getting the From, To, Cc and Subject from an MSG File The following code snippet shows you how to load an MSG file. You can load the MSG file using a single line of code by calling the FromFile() static method and passing the path to the MSG file. The Aspose.Email library provides the MapiMessage class for loading and parsing MSG files. In this section, we will present the code that we used in the demo to show the MSG file contents. Parsing and Viewing MSG File Contents Programmatically The following screenshot shows the Attachments tab view. Browse to the desired folder and save the file there. You can also save the attachments to your system by selecting an attachment and clicking the Save button. If you click the Attachments tab, it shows the list of attachments in the MSG file (if any). In the bottom pane, we have used tab controls to show other message details like the text body, RTF body, message header, attachments and MAPI properties. We have used labels to display the subject, to, cc and from information. If you click any MSG in the list, the corresponding message is opened and the details can be seen in the UI below the list view control. As you can see from the screenshot above, the Subject, From, To and Cc fields are shown in the top list. Only MSG files appear in the top list view control in the corresponding folder in the treeview. ![]() You can browse the folders to show or filter the MSG files. The left pane shows the drives and folders on the system, just like Windows explorer does. We have created a simple demo application that can be used to parse and view MSG files. The source code for the project below is included in the samples provided with the installer. The trial version of Aspose.Email can be downloaded easily. Use this library to view MSG files in Windows, web, console or any. The code examples in this article shows how to parse an Outlook MSG file in a C# application using the Aspose.Email library. Or, if you do not have Microsoft Outlook installed on your system, you can build your own viewer to get the MSG file contents. If you have need to manipulate MSG files in your project or application, you need an API for parsing the Outlook MSG format. This article is about parsing and viewing Microsoft Outlook MSG files. Getting the MAPI Properties of the MSG File.Getting Attachments from MSG File and Saving to Disk.Getting the From, To, Cc and Subject from an MSG File.Parsing and Viewing MSG File Contents Programmatically.If in case of any technical issues, one can easily reach out to the technical support team, which is always available to provide instant service. During the process of viewing the MSG file, there is no risk of formatting or data loss issue. In addition to that, it also permits users to search MSG file without MS Outlook installation. This is because the tool renders multiple preview modes options to view and examine the MSG files. ![]() In order to deeply analyze the uploaded MSG files, users will be extremely benefited with SysTools MSG Viewer Pro software. Along with that, one can also set the margin size, paper orientation, page size of the output printed file. This feature to search and print MSG files helps users to easily take the print copy of the valued MSG file without losing the consistency of the data.
0 Comments
Leave a Reply. |