Giter VIP home page Giter VIP logo

cs-vsto-powerpoint-writer's Introduction

cs-vsto-powerpoint-writer

Package provides VSTO-based C# implementation of a powerpoint modifier

Objective

The project is to create a simple library which uses VSTO to automate powerpoint modification by using C# DSL syntax.

Langauage

C#

Install

The library was built using VS2015 Community Edition. You can clone and build the library then add the library to your references in a .NET project. Note that this library is based on VSTO and thus requires the availability of office 2007 for it to work. It also requires the following COM libraries to be available in the C# project's references

  • Microsoft.Office.Core (Version: 2.4)
  • Microsoft.Office.Interop.Excel (Version: 1.6)
  • Microsoft.Office.Interop.Powerpoint (Version: 2.9)

This link below shows how to solve the COM error when uninstall vs 2007 and reinstall some other version of office and then reinstall vs 2007:

https://social.msdn.microsoft.com/Forums/vstudio/en-US/08f13e9d-895c-4102-b6d9-e327af8cf8c0/0x80029c4a-typeecantloadlibrary?forum=vsto

Usage

Below is the C# sample code for modifying the input.ppt and producing the output.ppt:

PowerPointReportModifier builder = new PowerPointReportModifier();
builder.ChartIntercepted += (sender, e) =>
{
	string title = e.Title;
	PowerPoint.Chart chart = e.Chart;
	Worksheet sheet = e.Worksheet;

	// code to modify the chart here
};
builder.TableIntercepted += (sender, e) =>
{
	PowerPoint.Table table = e.Table;

	// code to modify the table here
};
builder.TextFrameIntercepted += (sender, e) =>
{
	PowerPoint.TextRange paragraph = e.Paragraph;
	
	// code to modify the paragraph here
};

builder.Apply("input.ppt", "output.ppt");

cs-vsto-powerpoint-writer's People

Contributors

chen0040 avatar

Stargazers

 avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.