Click here to Skip to main content
15,903,175 members
Please Sign up or sign in to vote.
4.00/5 (1 vote)
See more:
I have inserted a line into a power point slide using c# console application. The line inserted is slant. I have to rotate the line with some angle, so that line is straight. Do i have to use any namespace to achieve this.

the code i am writing is..

C#
public void AddLines(PowerPoint.Slide slide, float left, float top, float width, float height)
        {
            try
            {
                PowerPoint.Shape objAddLines = slide.Shapes.AddLine(left, top, width, height);
            }
            catch (Exception e)
            {
                Console.WriteLine(e.Message);
            }
        }
Posted
Updated 20-Apr-11 19:26pm
v2

1 solution

What I do when I don't know how to do something in any office program such as Word, Excel or PowerPoint is record a macro.

When the macro records you record the behavior that you want in your code, in your case rotate a line. Next, stop the macro from recording and look in the generated macro source file. This has helped me a lot of times.
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900