Monday, 7 July 2014

Create a PowerPoint Presentation Using C# and Embed a Picture





Create a PowerPoint Presentation Using C# and  Embedding the  Images

Today I will show how to Create PowerPoint Presentation Using C# (Interop).

Creating PowerPoint Presentations Using Office Automation, this will be very useful for IT departments and Organizations for their Employees.

We need to add following references
 
Embedding the  Images in Microsoft PowerPoint Presentations.



using Microsoft.Office.Interop.PowerPoint;
using Microsoft.Office.Interop.Graph;
using Microsoft.Office.Core;

Microsoft.Office.Interop.PowerPoint.Application pptApplication = new Microsoft.Office.Interop.PowerPoint.Application();
Microsoft.Office.Interop.PowerPoint.Slides slides;
Microsoft.Office.Interop.PowerPoint._Slide slide;
Microsoft.Office.Interop.PowerPoint.TextRange objText;
Presentation pptPresentation = pptApplication.Presentations.Add(MsoTriState.msoTrue);
Microsoft.Office.Interop.PowerPoint.CustomLayout customLayout = pptPresentation.SlideMaster.CustomLayouts[Microsoft.Office.Interop.PowerPoint.PpSlideLayout.ppLayoutText];

// Create new Slide
slides = pptPresentation.Slides;
slide = slides.AddSlide(1, customLayout);


// Add title
objText = slide.Shapes[1].TextFrame.TextRange;
objText.Text = "journey to dotnet authority";
objText.Font.Name = "Trebuchet MS";
objText.Font.Size = 32;
string innerChartFilePath = "D:\Images\Profile.png";
slide.Shapes.AddPicture(innerChartFilePath, Microsoft.Office.Core.MsoTriState.msoFalse, Microsoft.Office.Core.MsoTriState.msoTrue, 10, shape.Top, width,height);
pptPresentation.SaveAs(@"D:\Image"+DateTime.Now.Ticks.ToString()+".pptx", Microsoft.Office.Interop.PowerPoint.PpSaveAsFileType.ppSaveAsDefault, MsoTriState.msoTrue);
 pptPresentation.Close();
 pptApplication.Quit();






















Tuesday, 1 July 2014

ASP.NET MVC Application Folder Structure



ASP.NET MVC Application Folder Structure

This article am going to explains about the default Folder structure of an ASP.NET MVC
ASP.NET MVC web Application having the following folder structure.


Application Information
                Properties
                References
Application Folders
                App_Data Folder
                Content Folder
                Controller Folder
Models Folder
Views Folder
Configuration Folders
                Global.asax
                Packages.config
                Web.config

How to Create New ASP.NET MVC 4 WEb Application

In this article am going to explain about he basic's of creating new ASP.NET MVC 4 Application.

1. Create a new project.
















2. Select Visual c# in that Web
    3. In the web select ASP.NET MVC 4 Web Application.
    4. name as MVCDemo
















 
    5. select the Template "Basic"
    6. select the View Engine Razor.
    7. De-select "Create a unit test Project "