C# / Windows Forms - Display a PowerPoint slide-show without Office installed? - c#

I know I can display a Powerpoint presentation within my own form (see here), but I'm wondering whether there is a way to get rid of Microsoft Office as a requirement?
I guess basically what I'm asking for is a library which will display Powerpoint slide-shows without my users having to install MS Office on every machine. They do not need to CREATE slide-shows, just display them. Does such a library exist? I have searched all over the place and I'm always referred back to the MS Interop / ActiveX stuff.
Any help is appreciated!
Tom

Try this: PowerPoint Viewer 2007. Also see this thread about embedding a Powerpoint Viewer 2007 instance on a VB.NET form

I believe you can accomplish this with Aspose.Slides. It can open up an PPT file you have, then I think you could save each sheet to a image. Finally, you could show the images in your app.

Related

I need to show excel sheet and ppt file in Wpf control without installing MS office

I tried with
Webbrowser Control:
When i give the url of file to Webbrowser control of Wpf, it opens the file
using MS office.
Code Snippet: webbrowser1.Navigate(new Uri(#"D:\ExcelFiles\data.xls");
DocumentViewer:
It requires Microsoft.Office.Interop.Excel.dll to achieve.
I dont want to use MS office or any other installed application to display. Want to render it in any control of WPF only.
So i have to use OpenSource dll to achieve it.
I used spire.DocViewer.Wpf.dll to render word document (WordDoc viewer). Like wise, i need to display excelsheet and ppt files.
Please suggest any open source dll to achieve this.

Opening Word (.docx) files on a Windows Form C#

I'm trying to make my program have the ability to display a Microsoft Word file on a form but not having any luck in doing so. I want to be able to open the file and display it on the form as a Read-Only. So basically just display it's contents. Various users on the web have recommended displaying files in the WebBrowser control (under toolbox). I have tried this but failed to get it working. My end goal is to be able to annotate on top of the web browser (or something of similar manner) and subsequently save the annotations along with the opened file.
I'm not that experienced in the C# language too so any help on how to achieve my problem would be greatly appreciated.
You need a DOCX viewer control. My company recently gave away our multi-format WinForms viewer control as a free product - XtremeDocumentStudio .NET Free. It can display DOCX and is available on NuGet. It does not require a Web Browser control for embedding an online viewer or Word software installed locally.
http://www.nuget.org/packages/XtremeDocumentStudio.NETFree/
There are some good links that might help you.
First, you will find a closely related or similar question here
And in that conversation someone posted the following link which is about how to build a user control for displaying Word documents in a webbrowser control.
I also found another article here about how to integrate Excel in a Windows Form application using WebBrowser. But Excel is used as an example and you may be able to adapt it to Word.

How to View Microsoft documents using WinForms WebBrowser

I need to be able to view a file (.doc, docx, .pdf, .txt,.....ect) in the System.Windows.Forms.WebBrowser (C# Visual Studio 2008) on a system that does not have office installed on it. How do I do that? Can it be done? I viewed many of the documentation that are out there regarding this and most all have office installed already. I just need to be able to preview the documents, not modify them.
You can't do this in general. The way a browser displays an Office Document (or any other kind of document) is to run the application that created it - in this case, Office.
There are various tools which can render Office documents as HTML. You may be able to use those. One that I see mentioned frequently is Aspose, though I have not used it.
No, you can't do this using just the WebBrowser.
If you've seen the WebBrowser open a Word doc before, it's because Office was installed on the system, and it was using the Office ActiveX control to view it.
Some alteratives:
Programmatically upload the document to Office Live, then navigate the web browser to it. Office Live now has "Word in a web browser" functionality, check it out here.

Programmatically Printing or converting a powerpoint to one note

Hello I want to create an application which will make things easier for me.
I always need to convert a bunch of power point documents to one note, but the process takes a few minutes for each. The process goes as follows:
1.)I have to open the powerpoint and then print>Print to Onenote.
2.)Then once Onenote opens I have to, file>save as>Page> Onenote 2007 Section.
I want create an application that will allow me to be able to browse for a PowerPoint file and then have all the slides from the PowerPoint file to be converted into a one note page and then saved in One note 2007 format.
I have experience programming using C#.
Thank you!
One simple thing you can try is to use SendKeys.
If that is not good enough, you can do the full Office interop story.

Using C# to display powerpoint

Is there any good way to use a windows application written in C# to display/control a powerpoint slideshow? Ultimately I would like to show thumbnails in a form and clicking these thumbnails would advance the slides shown on a second monitor (similar to using Powerpoint itself to show a slideshow on a second monitor).
I would like to be able to use Powerpoint Viewer if Powerpoint is not installed.
There seems to be some ActiveX-controls that allows integration of Powerpoint in a form, but most of these seem to cost money, does anyone have experience using one of these controls?
Edit: I know that there is an object model accessable by adding a reference to Microsoft.Office.InterOp.Powerpoint, but I want to be able to distribute the resulting program without having Microsoft Office as a prerequisite, that was why I mentioned Powerpoint Viewer because it can be distributed freely.
This kb lays out the basics for working with the powerpoint presentation viewer object model. I'd suggest you include the viewer when you distribute your application.
http://support.microsoft.com/kb/265385
Once you get a reference to the viewer (top level) object it is basically the same as working with the powerpoint.presentation object model, but with less functionality (i.e. editing, etc)
If you are working with Powerpoint 2007, then you can add editing functionality by using the System.XML and related namespaces to work with the presentation file as an open xml file.
Regarding the comments about UNO/openoffice.org, I think these miss the point, as you cannot use UNO for working with powerpoint, it is for openoffice and that was not the origianl requirement of the questioner.
there are 3rd party toolsets like aspose, but then your goal was to work with the powerpoint viewer component (free) so I'm guessing you want to avoid paying for dev tools? Either way viewer components OM is perfectly suitable for displaying and previewing and existing slide show. (you will need one copy of Powerpoint so that you can author the presentation from scratch, plus Visual Studio to create the VSTO project).
One of our softwares here at work does that. Initially we used MS Office but recently we switched to use OpenOffice.org Uno since it offers better control than MS Office and is easier to work with. It has .NET CLI-bindings.
To answer your question, yes it can be done but our engineers would recommend you use OpenOffice.org instead.
Just like with Microsoft Excel and Word, Powerpoint has an Object Model that you can access in code by including a reference in your project to:
Microsoft.Office.InterOp.Powerpoint.
I've used the Excel and Word models, but haven't used the one for Powerpoint. You can get a little taste of what's available by opening up the Object Browser once you've included the reference to see what kind of functionality is available. This might be a viable solution for you if you don't want to use a 3rd party tool to access the object model.
I have used the Word toolkit from Aspose -- they have a Powerpoint toolkit too that I think would be worth looking at.
http://www.aspose.com/categories/file-format-components/aspose.slides-for-.net-and-java/default.aspx

Categories