Editing Powerpoint Slide in C# Windows Form - c#

I'm trying to develop a Point of Purchase sign creator.
The best way that I can think of going about this is using a powerpoint slide to create the POP.
The problem that I'm having with this is I can find pages after pages of information to open up a presentation, but I can't seem to find anything that'll let me open the actual powerpoint file for editing. The client will not need to make new textboxes or anything of that sort, but will need to be able to edit them.
Currently I'm using a web browser to view the ppt presentation but as I mentioned, it is merely a presentation.
private void Form1_Load(object sender, EventArgs e)
{
this.webBrowser1.Navigate("about.blank");
string path = "C:\\Users\\Test\\test.ppt";
this.webBrowser1.Navigate(path);
}
Thank you in advance
p.s. I do have Office Interop referenced in the project but it seems that everything is so situationally specific that I cannot find much information to help me out.

It would be good if you could provide a little more info on exactly how flexible the editing needs to be, and what version of PowerPoint you are targeting. From your question and approach you appear to be looking for access to all of the capabilities. This is not something that you are going to be able to do easily with your approach.
A few other options which might work for you:
Use the Open XML format and generate the PPT from an external data source. This seems a lot cleaner to me but you have less flexibility than your current approach. You would need to capture user's changes yourself and then generate the file to preview.
Copy a PPT file to a temp file and open it in PowerPoint for editing. Then allow the user to edit and update it. When they close the temp file capture it and bring them back to your main application. The user has full access to the PPT file to do what they want but you have a lot of edge cases to handle. eg. what if they close the file and don't exit PowerPoint etc.
Write a PowerPoint add-in that works with your application, and make some Ribbon customisations. The user will get the full PowerPoint experience but there will be custom support for your application on the Ribbon and the user can just click to have the finished PPT sent back to your application. This seems like it would be more maintainable than option 2 since you are probably going to use more standard APIs and a user has to click your "finish" button to complete the process meaning that you have a clearly defined end point instead of watching for user behaviour that you could miss.

Related

C# Organize Data Onto a Print Template

Ok I've tried this in every possible combination... I know this can be done in Access, so I know it can be done in C#...
What I'm trying to do is set up a print button, that when clicked, organizes data from various controls on my form into specific positions on a predefined template. Like say I'm generating a Job Estimate, and I want to print it... It would look silly printing the control or form, so I'd like it organized into a neat standard format on a page, that may include a logo etc. I don't want the data exported to a document, I just want the print button to auto-generate this so that it can be printed from the application.
Can anyone point me to some resource that deals with this? I have googled my mind away, and searched all over stack overflow, but I'm not even sure what the correct wording to look something like this up with is, as it keeps giving me c++ or some other random stuff to look at that has nothing to do with what I am looking for....
What you are looking for is a reporting tool, which can render a structured report to screen, or to print or to a file format like PDF.
Many reporting tools exist for .Net development, Crystal Reports, Active Reports, Reporting Services in SQL Server.

Using an editor like FckEditor in a form application

I am working on a contract management system on c# form application, one of the main parts of the project is to create a letter.
In this part of the application a user can send a letter with in the shape he or she wants, so I need an editor like FCK in html, because my users should be able to insert table insert image and etc.
Any idea how to get this working? Any concerns?
You could indeed use a HTML WYSIWYG editor, but depending on the quality of it, it might raise problems when converting the output of it to print. This may also depend on the framework used to generate the Word document.
In one of our environments, we use CKEditor and JasperReports. That combination is suitable to export to Word, since JasperReports supports reading HTML and convert that to Word.
However, the best solution may depend on your business requirements and personal preferences.
If the application is a business application, another option is to let them edit the document in Word. Our company (disclaimer: I am biased) has build a product that supports editing a Word document from a template loaded and filled from a database (or multiple databases). However, if it is useful to you depends on your business requirements.
FCK is history now and as mentioned by others CKEditor is the successor. TinyMCE would be another alternative, or any other might be..
But what I want to mention is along with possible printing issues (that I have never dealt with) I want to underline another aspect:
my users should be able to insert table insert image and etc.
uploading and inserting images might be another issue...they don't come with a built in uploader, they sell it. you have the option to buy CKFinder along with CKEditor and Moxiemanager along with TinyMCE unless you choose to handle upload and insert into the editor process yourself.

Office Addin problem

I'm currently developing an add-in aimed to edit office documents stored in a codendi forge.
First problem was the read only flag on my file. A simple ‘save as’ solved that problem.
This solution was ok until I removed codendi’s cookie then instead of my file I received an error page.
What I want to do is to be able to catch an event triggered by office before it starts downloading the file. Then I can prompt the user for authentication and recreate a cookie by myself without the need for the user to open internet explorer and sign in.
Is there a way to catch an event indicating that word, excel and powerpoint are about to start a download?
Thanks in advance
I'm not sure I really understand what you want to do.
I don't think any office application actually downloads the wanted file, it is downloaded by your browser in a temporary file and therefrom opened by it.
I think that if you want to edit the file from you client, the best way would be to use the soap interface, which is part of Codendi. Have a look to
[yourforgehostname]/soap
[yourforgehostname]/soap/codendi.wsdl.php?wsdl
If you want to see the wsdl in a more readable form consider using
http://tomi.vanek.sk/index.php?page=wsdl-viewer
One of the supported API is login
Hope it helps

Microsoft Office Word in a web browser

I want to have a Microsoft office word inside a web browser so that i can get the control to format the text and specify proper indentation. I don't want a client side to save the document.
It should be the same as http://www.asp.net/ajax/ajaxcontroltoolkit/samples/htmleditor/htmleditor.aspx but i want an additonal component i.e RULER to it.
Is there a way i can get that kind of control or a MSword control without save button.
Please Help
You won't be able to get a "Word Control" into a webpage (not least since that requires every user of your site to have a copy of Word installed), but you can look into something like CKEditor, which is a WYSIWYG editor written in Javascript/HTML. Getting a ruler in there may be difficult though.
What are you trying to do? I'm not sure what your question is, but what you are referring to is a WYSIWYG editor. There are many versions and options for embedding one in your web page. You mention one already. Here's some more:
TinyMCE
Markdown
YUI Editor
Yes, there is such a MS Office control called aceoffix. It works like calling MS Office from local machine and embeding it in web browser. Users can edit,view and save document online diretly. Developer can also customize these functions, such as disable the "save" button.

How to restrict download options on a single report in SSRS?

This question asks how to restrict for a whole server. I just want to do so for a single report. I found a code snippet but it doesn't provide any clues on how to implement:
foreach (RenderingExtension extension in this.reportViewer.LocalReport.ListRenderingExtensions()) {
if (extension.Name == "PDF") {
((Extension)(extension.GetType().GetField("m_serverExtension", System.Reflection.BindingFlags.NonPublic | System.Reflection.BindingFlags.Instance).GetValue(extension))).Visible = false;
}
I can't see how to make the report reference this code upon loading. Does anyone know how I am supposed to make the report execute this code?
EDIT: Incidentally report access is through the SSRS Report Manager web app. We are, in the main, delighted with this product so wouldn't consider reinventing the wheel in order to implement a hack to produce what is, essentially a "would be nice" feature.
It still boggles the mind slightly that the report's available rendering options are not controllable at the report level. Ho hum.
Incidentally I found this blog entry which clarifies the above code a little. Turns out we're talking about using a reportviewer component to limit the export options. Apparently this requires a dirty, dirty hack and besides it's not how we want to run our reporting function.
So unless anyone has a better idea than this within the next fortnight I'll mark this as the answer which basically sums up to:
You can only restrict functionality like this under certain conditions and by no means easily even when you do.
This seems like a clear failure in the wider fitness of SSRS for purpose as we have users who require Excel export functionality and users who need to be limited to PDF only. Oh well.
Does it matter?
Once they've downloaded the data and taken it offsite, you've lost it anyway.
You haven't really described how you are calling the reports - have you created some kind of application? Are you actually using the report viewer control?
You can generate a report in a specific format using the report URL and including the rs:Format parameter, e.g.
http://SERVER/reportserver?%2fSomeFolder%2fSomeReport&rs:Command=Render&rs:Format=PDF
The above URL generates the report as a PDF. You can also use the URL to hide the report toolbar etc. so you could create these URLs as links in your application, maybe one using just rs:Command=Render as a "View Report" link and one link that includes rs:Format=PDF as an "Export to PDF" link.
More on Reporting Services URL access.

Categories