Show .MSG file with Outlook in C# application? - c#

Is there a way (some specific COM object) which can be integrated into your app window and render the content of .MSG file? There are solutions for parsing .MSG files but I'd like to easily display it. Emails with tables, links and especially images are very tricky to render correctly - as I understand, only Outlook is able to render is accurately in a shape user is accustomed to.
Even Preview Handler cripples email formatting - you can notice it in Windows Explorer's Preview Pane. I guess the only reliable solution is to ask Outlook to render it for you...

You may consider automating Outlook to display the .msg files. See How to automate Outlook and Word by using Visual C# .NET to create a pre-populated e-mail message that can be edited for more information.
Also you may consider using third-party components for getting the job done.

Related

box viewer for microsoft office documents

I have a quiz website, where user will select the topic and can read contents.
So I have contents in various formats like video, textfile, pdf reports.
For contents to show them in box I am using http://viewerjs.org/.
since it supports limited extensions and doesn't fill up my all requirements for file type- .docx,.doc, .xlsx,.pptx.
Is there any open source box viewer that supports office document?
Although I can read their contents through c# and display them back as plain text but my primarily requirement is to show them in box as viewer.js does it for pdf.
I think you are conflating http://viewerjs.org/ with the Box View API, which has an open-source viewer component that is also called viewer.js.
The View API will convert Office file formats as well as .pdf.
The View API does not have a C# SDK available yet (as far as I know), but there are a bunch of open source ones in other languages.

programmatically call and present a power point presentation

I have an ASP.NET C# web application where users can upload their PowerPoint presentations(ppt files). I want programmatically (with C#), to call a power point presentation and be able to present it from a webpage. Is it possible? And how can I do this?
You can use Interop to save the uploaded Powerpoint presentation as a series of graphics (e.g. PNG). Within Powerpoint, that would be File / Save As / *.png. You can accomplish the same programatically. Running interop code from ASP.Net is not a good idea. You can run a windows service that watches for uploaded ppt files and converts them to a corresponding series of images.
This would not preserve transitions and animations, but would otherwise work fine.
You can then use a slideshow gallery to display the various images (e.g. using Flash or JavaScript... there are many solutions available on the web).
Alternatively if you can ensure that the end user has at least the free Powerpoint viewer installed, you can return the ppt file to them with the appropriate mime type set, and the viewer will display it.
Change the Powerpoint presentation into series of graphic using interop assembly as Eric said
To make slideshow gallery you can follow below link which illustrated it very well with coding. You have to use javascript to accomplish it.
Visit http://www.c-sharpcorner.com/uploadfile/anjudidi/making-an-image-slideshow-in-Asp-Net/
The below link also show how to create slide show but it is taking graphics from database.
http://www.aspdotnet-suresh.com/2011/12/jquery-lightbox-image-slideshow-gallary.html

How to programmatically convert a pdf file to a text file?

I need to load a pdf file and then convert it to a text file programmatically in order to then parse it.
Another possibility would be to execute the file (execute Adobe Reader, with the pdf file as the argument) and then "send keys" to it to save the file as text.
However, I would prefer not to do it that way (opening the file) but will if that is the only solution. But: is it even possible to do a "send keys" sort of functionality in C#/WPF?
Note: I don't want to buy any custom components, and besides, I'm using Visual Studio 2012 RC in this "home" project, so I don't know if 3rd party components would be compatible anyway.
If you are looking to deploy this application to other users, I would tend to lean towards using one of the many PDF libraries available and process the PDF via code vs. attempting to use Adobe Reader. It will eliminate issues if your users don't have Adobe Reader installed.
Try starting at the link below for some library ideas.
https://stackoverflow.com/questions/373926/lightweight-open-source-pdf-library-in-c
C# PDF Control & Library

How to merge different document types and show as stack in .NET application

Suppose in .NET (don't care what language) I want to show a user a PDF, Word and Excel file together. I am trying to replicate a document process where a user might have a PDF file and he would like to attach a WORD file and an Excel file let's say to make a stack of documents (that I would save in some directory). Then he would like to click on a button and see a stack of these documents in 1 application of some sort.
How can I display the stack of documents WITHOUT first opening WORD, then openinig EXCEL and then openining ADOBE ACROBAT - this would be really annoying for the user. I would like one unified application or some idea to mimic one in .NET that can just show all 3 documents as if they were printed one after the other on paper. (I hope I am explaining this clearly)
The only thing I can think of to do this would be to leverage some sort of PDF conversion process to create one PDF file containing all three of these documents in "printed" (page-by-page) form, and then show that. The one application I can think of that could show all of these files is a web browser with appropriate Office and Acrobat viewer plugins, and you might find it difficult to leverage that, as browser preference and other user OS settings can cause various strategies for application launching to fail.
I would convert the documents in PDF and develop a pdf viewer inside your application.
I would use a ready made library for that, don't reinvent the wheel.
For example: http://www.quickpdflibrary.com/products/quickpdf/index.php

Display a .msg file using WPF in C#

I am currently designing and implementing an application whereby a user can preview and classify emails (amongst other features). I wish to create a 'preview' of the email message which is in a .msg file format and display it to the user.
I am using C# so this is really a two part question. How do I get the .msg file into C# and secondly how do I display a preview within WPF? I am not asking for a full implementation (although it would be nice :p) but any comments or tips are extremely welcome.
Thank you :)
This is for the first question:
Reading an Outlook MSG File in C#

Categories

Resources